當前位置: 首頁>>代碼示例>>Java>>正文


Java CefURLRequest類代碼示例

本文整理匯總了Java中org.cef.network.CefURLRequest的典型用法代碼示例。如果您正苦於以下問題:Java CefURLRequest類的具體用法?Java CefURLRequest怎麽用?Java CefURLRequest使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CefURLRequest類屬於org.cef.network包,在下文中一共展示了CefURLRequest類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: send

import org.cef.network.CefURLRequest; //導入依賴的package包/類
public void send(CefRequest request) {
  if (request == null) {
    statusLabel_.setText("HTTP-Request status: FAILED");
    sentRequest_.append("Can't send CefRequest because it is NULL");
    cancelButton_.setEnabled(false);
    return;
  }

  urlRequest_ = CefURLRequest.create(request, this);
  if (urlRequest_ == null) {
    statusLabel_.setText("HTTP-Request status: FAILED");
    sentRequest_.append("Can't send CefRequest because creation of CefURLRequest failed.");
    repliedResult_.append("The native code (CEF) returned a NULL-Pointer for CefURLRequest.");
    cancelButton_.setEnabled(false);
  } else {
    sentRequest_.append(request.toString());
    cancelButton_.setEnabled(true);
    updateStatus("", false);
  }
}
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:21,代碼來源:UrlRequestDialogReply.java

示例2: onRequestComplete

import org.cef.network.CefURLRequest; //導入依賴的package包/類
@Override
public void onRequestComplete(CefURLRequest request) {
  String updateStr = "onRequestCompleted\n\n";
  CefResponse response = request.getResponse();
  boolean isText = response.getHeader("Content-Type").startsWith("text");
  updateStr+= response.toString();
  updateStatus(updateStr, isText);
}
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:9,代碼來源:UrlRequestDialogReply.java

示例3: onUploadProgress

import org.cef.network.CefURLRequest; //導入依賴的package包/類
@Override
public void onUploadProgress(CefURLRequest request, int current, int total) {
  updateStatus("onUploadProgress: " + current + "/" + total + " bytes\n", false);
}
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:5,代碼來源:UrlRequestDialogReply.java

示例4: onDownloadProgress

import org.cef.network.CefURLRequest; //導入依賴的package包/類
@Override
public void onDownloadProgress(CefURLRequest request, int current, int total) {
  updateStatus("onDownloadProgress: " + current + "/" + total + " bytes\n", false);
}
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:5,代碼來源:UrlRequestDialogReply.java

示例5: onDownloadData

import org.cef.network.CefURLRequest; //導入依賴的package包/類
@Override
public void onDownloadData(CefURLRequest request, byte[] data, int data_length) {
  byteStream_.write(data, 0, data_length);
  updateStatus("onDownloadData: " + data_length + " bytes\n", false);
}
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:6,代碼來源:UrlRequestDialogReply.java

示例6: onRequestComplete

import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
 * Notifies the client that the request has completed. Use the
 * CefURLRequest::GetRequestStatus method to determine if the request was
 * successful or not.
 */
void onRequestComplete(CefURLRequest request);
 
開發者ID:Panda-Programming-Language,項目名稱:Pandomium,代碼行數:7,代碼來源:CefURLRequestClient.java

示例7: onUploadProgress

import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
 * Notifies the client of upload progress. |current| denotes the number of
 * bytes sent so far and |total| is the total size of uploading data (or -1 if
 * chunked upload is enabled). This method will only be called if the
 * UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
 */
void onUploadProgress(CefURLRequest request, int current, int total);
 
開發者ID:Panda-Programming-Language,項目名稱:Pandomium,代碼行數:8,代碼來源:CefURLRequestClient.java

示例8: onDownloadProgress

import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
 * Notifies the client of download progress. |current| denotes the number of
 * bytes received up to the call and |total| is the expected total size of the
 * response (or -1 if not determined).
 */
void onDownloadProgress(CefURLRequest request, int current, int total);
 
開發者ID:Panda-Programming-Language,項目名稱:Pandomium,代碼行數:7,代碼來源:CefURLRequestClient.java

示例9: onDownloadData

import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
 * Called when some part of the response is read. |data| contains the current
 * bytes received since the last call. This method will not be called if the
 * UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.
 */
void onDownloadData(CefURLRequest request, byte[] data, int data_length);
 
開發者ID:Panda-Programming-Language,項目名稱:Pandomium,代碼行數:7,代碼來源:CefURLRequestClient.java

示例10: onUploadProgress

import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
 * Notifies the client of upload progress. |current| denotes the number of
 * bytes sent so far and |total| is the total size of uploading data (or -1 if
 * chunked upload is enabled). This method will only be called if the
 * UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
 */
void onUploadProgress(CefURLRequest request,
                      int current,
                      int total);
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:10,代碼來源:CefURLRequestClient.java

示例11: onDownloadProgress

import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
 * Notifies the client of download progress. |current| denotes the number of
 * bytes received up to the call and |total| is the expected total size of the
 * response (or -1 if not determined).
 */
void onDownloadProgress(CefURLRequest request,
                        int current,
                        int total);
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:9,代碼來源:CefURLRequestClient.java

示例12: onDownloadData

import org.cef.network.CefURLRequest; //導入依賴的package包/類
/**
 * Called when some part of the response is read. |data| contains the current
 * bytes received since the last call. This method will not be called if the
 * UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request.
 */
void onDownloadData(CefURLRequest request,
                    byte[] data,
                    int data_length);
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:9,代碼來源:CefURLRequestClient.java


注:本文中的org.cef.network.CefURLRequest類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。