- Update to Chromium revision 71081.

- Add a new |isMainContent| boolean argument to HandleLoadStart and HandleLoadEnd (issue #166).
- Only call HandleAddressChange and HandleTitleChange for the main content load (issue #166).
- Pass the URL for new popup windows to HandleBeforeCreated (issue #5).
- cefclient: Add a test for XMLHttpRequest.
- cefclient: Size popup windows in ClientHandler::HandleBeforeCreated.


git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@162 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-01-11 23:46:14 +00:00
parent b8385a7649
commit bf02152631
26 changed files with 248 additions and 134 deletions

View File

@ -61,3 +61,4 @@ Date | CEF Revision | Chromium Revision
2010-11-16 | /trunk@138 | /trunk@66269 2010-11-16 | /trunk@138 | /trunk@66269
2010-12-16 | /trunk@152 | /trunk@69409 2010-12-16 | /trunk@152 | /trunk@69409
2010-01-07 | /trunk@159 | /trunk@70742 2010-01-07 | /trunk@159 | /trunk@70742
2010-01-11 | /trunk@162 | /trunk@71081

10
cef.gyp
View File

@ -137,7 +137,7 @@
# Add the WebCore resources to the bundle. # Add the WebCore resources to the bundle.
'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/', 'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/',
'files': [ 'files': [
'../third_party/WebKit/WebCore/Resources/', '../third_party/WebKit/Source/WebCore/Resources/',
], ],
}, },
], ],
@ -243,14 +243,16 @@
'../third_party/libxml/libxml.gyp:libxml', '../third_party/libxml/libxml.gyp:libxml',
'../third_party/libxslt/libxslt.gyp:libxslt', '../third_party/libxslt/libxslt.gyp:libxslt',
'../third_party/modp_b64/modp_b64.gyp:modp_b64', '../third_party/modp_b64/modp_b64.gyp:modp_b64',
'../third_party/WebKit/WebCore/WebCore.gyp/WebCore.gyp:webcore', '../third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit', '../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit',
'../third_party/zlib/zlib.gyp:zlib', '../third_party/zlib/zlib.gyp:zlib',
'../ui/ui.gyp:ui_base',
'../webkit/support/webkit_support.gyp:appcache', '../webkit/support/webkit_support.gyp:appcache',
'../webkit/support/webkit_support.gyp:blob', '../webkit/support/webkit_support.gyp:blob',
'../webkit/support/webkit_support.gyp:database', '../webkit/support/webkit_support.gyp:database',
'../webkit/support/webkit_support.gyp:fileapi', '../webkit/support/webkit_support.gyp:fileapi',
'../webkit/support/webkit_support.gyp:glue', '../webkit/support/webkit_support.gyp:glue',
'../webkit/support/webkit_support.gyp:webkit_gpu',
'../webkit/support/webkit_support.gyp:webkit_resources', '../webkit/support/webkit_support.gyp:webkit_resources',
'../webkit/support/webkit_support.gyp:webkit_strings', '../webkit/support/webkit_support.gyp:webkit_strings',
'libcef_static', 'libcef_static',
@ -442,14 +444,16 @@
'../third_party/libxml/libxml.gyp:libxml', '../third_party/libxml/libxml.gyp:libxml',
'../third_party/libxslt/libxslt.gyp:libxslt', '../third_party/libxslt/libxslt.gyp:libxslt',
'../third_party/modp_b64/modp_b64.gyp:modp_b64', '../third_party/modp_b64/modp_b64.gyp:modp_b64',
'../third_party/WebKit/WebCore/WebCore.gyp/WebCore.gyp:webcore', '../third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit', '../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit',
'../third_party/zlib/zlib.gyp:zlib', '../third_party/zlib/zlib.gyp:zlib',
'../ui/ui.gyp:ui_base',
'../webkit/support/webkit_support.gyp:appcache', '../webkit/support/webkit_support.gyp:appcache',
'../webkit/support/webkit_support.gyp:blob', '../webkit/support/webkit_support.gyp:blob',
'../webkit/support/webkit_support.gyp:database', '../webkit/support/webkit_support.gyp:database',
'../webkit/support/webkit_support.gyp:fileapi', '../webkit/support/webkit_support.gyp:fileapi',
'../webkit/support/webkit_support.gyp:glue', '../webkit/support/webkit_support.gyp:glue',
'../webkit/support/webkit_support.gyp:webkit_gpu',
'../webkit/support/webkit_support.gyp:webkit_resources', '../webkit/support/webkit_support.gyp:webkit_resources',
'../webkit/support/webkit_support.gyp:webkit_strings', '../webkit/support/webkit_support.gyp:webkit_strings',
], ],

View File

@ -592,19 +592,24 @@ public:
// Event called when the browser begins loading a page. The |frame| pointer // Event called when the browser begins loading a page. The |frame| pointer
// will be empty if the event represents the overall load status and not the // will be empty if the event represents the overall load status and not the
// load status for a particular frame. The return value is currently ignored. // load status for a particular frame. |isMainContent| will be true if this
// load is for the main content area and not an iframe. This method may not
// be called if the load request fails. The return value is currently ignored.
/*--cef()--*/ /*--cef()--*/
virtual RetVal HandleLoadStart(CefRefPtr<CefBrowser> browser, virtual RetVal HandleLoadStart(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) =0; CefRefPtr<CefFrame> frame,
bool isMainContent) =0;
// Event called when the browser is done loading a page. The |frame| pointer // Event called when the browser is done loading a page. The |frame| pointer
// will be empty if the event represents the overall load status and not the // will be empty if the event represents the overall load status and not the
// load status for a particular frame. This event will be generated // load status for a particular frame. |isMainContent| will be true if this
// irrespective of whether the request completes successfully. The return // load is for the main content area and not an iframe. This method will be
// value is currently ignored. // called irrespective of whether the request completes successfully. The
// return value is currently ignored.
/*--cef()--*/ /*--cef()--*/
virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser, virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) =0; CefRefPtr<CefFrame> frame,
bool isMainContent) =0;
// Supported error code values. See net\base\net_error_list.h for complete // Supported error code values. See net\base\net_error_list.h for complete
// descriptions of the error codes. // descriptions of the error codes.

View File

@ -412,18 +412,23 @@ typedef struct _cef_handler_t
// Event called when the browser begins loading a page. The |frame| pointer // Event called when the browser begins loading a page. The |frame| pointer
// will be NULL if the event represents the overall load status and not the // will be NULL if the event represents the overall load status and not the
// load status for a particular frame. The return value is currently ignored. // load status for a particular frame. |isMainContent| will be true (1) if
// this load is for the main content area and not an iframe. This function may
// not be called if the load request fails. The return value is currently
// ignored.
enum cef_retval_t (CEF_CALLBACK *handle_load_start)( enum cef_retval_t (CEF_CALLBACK *handle_load_start)(
struct _cef_handler_t* self, struct _cef_browser_t* browser, struct _cef_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame); struct _cef_frame_t* frame, int isMainContent);
// Event called when the browser is done loading a page. The |frame| pointer // Event called when the browser is done loading a page. The |frame| pointer
// will be NULL if the event represents the overall load status and not the // will be NULL if the event represents the overall load status and not the
// load status for a particular frame. This event will be generated // load status for a particular frame. |isMainContent| will be true (1) if
// irrespective of whether the request completes successfully. The return // this load is for the main content area and not an iframe. This function
// value is currently ignored. // will be called irrespective of whether the request completes successfully.
// The return value is currently ignored.
enum cef_retval_t (CEF_CALLBACK *handle_load_end)(struct _cef_handler_t* self, enum cef_retval_t (CEF_CALLBACK *handle_load_end)(struct _cef_handler_t* self,
struct _cef_browser_t* browser, struct _cef_frame_t* frame); struct _cef_browser_t* browser, struct _cef_frame_t* frame,
int isMainContent);
// Called when the browser fails to load a resource. |errorCode| is the error // Called when the browser fails to load a resource. |errorCode| is the error
// code number and |failedUrl| is the URL that failed to load. To provide // code number and |failedUrl| is the URL that failed to load. To provide

View File

@ -5,7 +5,7 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "third_party/WebKit/WebCore/config.h" #include "third_party/WebKit/Source/WebCore/config.h"
MSVC_PUSH_WARNING_LEVEL(0); MSVC_PUSH_WARNING_LEVEL(0);
#include "MemoryCache.h" #include "MemoryCache.h"
#include "TextEncoding.h" #include "TextEncoding.h"

View File

@ -9,7 +9,7 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "third_party/webkit/webcore/config.h" #include "third_party/WebKit/Source/WebCore/config.h"
MSVC_PUSH_WARNING_LEVEL(0); MSVC_PUSH_WARNING_LEVEL(0);
#include "PlatformContextSkia.h" #include "PlatformContextSkia.h"
MSVC_POP_WARNING(); MSVC_POP_WARNING();

View File

@ -25,7 +25,6 @@
#include "webkit/extensions/v8/gears_extension.h" #include "webkit/extensions/v8/gears_extension.h"
#include "third_party/WebKit/WebKit/chromium/public/WebData.h" #include "third_party/WebKit/WebKit/chromium/public/WebData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h" #include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"
#include "third_party/WebKit/WebKit/chromium/public/WebGraphicsContext3D.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h" #include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h" #include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h"
@ -43,6 +42,7 @@
#include "webkit/glue/webfileutilities_impl.h" #include "webkit/glue/webfileutilities_impl.h"
#include "webkit/glue/webkit_glue.h" #include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webkitclient_impl.h" #include "webkit/glue/webkitclient_impl.h"
#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
class BrowserWebKitInit : public webkit_glue::WebKitClientImpl { class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
@ -229,7 +229,7 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
} }
virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D() { virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D() {
return WebKit::WebGraphicsContext3D::createDefault(); return new webkit_gpu::WebGraphicsContext3DInProcessImpl();
} }
WebKit::WebString queryLocalizedString( WebKit::WebString queryLocalizedString(

View File

@ -162,12 +162,15 @@ void TranslatePopupFeatures(const WebWindowFeatures& webKitFeatures,
// WebViewClient ------------------------------------------------------------- // WebViewClient -------------------------------------------------------------
WebView* BrowserWebViewDelegate::createView(WebFrame* creator, WebView* BrowserWebViewDelegate::createView(WebFrame* creator,
const WebWindowFeatures& features, const WebURLRequest& request, const WebWindowFeatures& features,
const WebString& name) { const WebString& name) {
CefString url;
if (!request.isNull())
url = request.url().spec().utf16();
CefPopupFeatures cefFeatures; CefPopupFeatures cefFeatures;
TranslatePopupFeatures(features, cefFeatures); TranslatePopupFeatures(features, cefFeatures);
CefRefPtr<CefBrowserImpl> browser = CefRefPtr<CefBrowserImpl> browser =
browser_->UIT_CreatePopupWindow(std::wstring(), cefFeatures); browser_->UIT_CreatePopupWindow(url, cefFeatures);
return browser.get() ? browser->GetWebView() : NULL; return browser.get() ? browser->GetWebView() : NULL;
} }
@ -217,34 +220,6 @@ void BrowserWebViewDelegate::printPage(WebFrame* frame) {
browser_->UIT_PrintPages(frame); browser_->UIT_PrintPages(frame);
} }
void BrowserWebViewDelegate::didStartLoading() {
// clear the title so we can tell if it wasn't provided by the page
browser_->UIT_SetTitle(std::wstring());
CefRefPtr<CefHandler> handler = browser_->GetHandler();
if(handler.get()) {
// Notify the handler that loading has started
handler->HandleLoadStart(browser_, NULL);
}
}
void BrowserWebViewDelegate::didStopLoading() {
if(browser_->UIT_GetTitle().empty()) {
// no title was provided by the page, so send a blank string to the client
CefRefPtr<CefHandler> handler = browser_->GetHandler();
if(handler.get()) {
// Notify the handler of a page title change
handler->HandleTitleChange(browser_, browser_->UIT_GetTitle());
}
}
CefRefPtr<CefHandler> handler = browser_->GetHandler();
if(handler.get()) {
// Notify the handler that loading has ended
handler->HandleLoadEnd(browser_, NULL);
}
}
bool BrowserWebViewDelegate::shouldBeginEditing(const WebRange& range) { bool BrowserWebViewDelegate::shouldBeginEditing(const WebRange& range) {
return browser_->UIT_AllowEditing(); return browser_->UIT_AllowEditing();
} }
@ -657,14 +632,12 @@ void BrowserWebViewDelegate::didCreateDataSource(
void BrowserWebViewDelegate::didStartProvisionalLoad(WebFrame* frame) { void BrowserWebViewDelegate::didStartProvisionalLoad(WebFrame* frame) {
if (!top_loading_frame_) { if (!top_loading_frame_) {
top_loading_frame_ = frame; top_loading_frame_ = frame;
is_main_content_ = true;
} }
UpdateAddressBar(frame->view());
} }
void BrowserWebViewDelegate::didReceiveServerRedirectForProvisionalLoad( void BrowserWebViewDelegate::didReceiveServerRedirectForProvisionalLoad(
WebFrame* frame) { WebFrame* frame) {
UpdateAddressBar(frame->view());
} }
void BrowserWebViewDelegate::didFailProvisionalLoad( void BrowserWebViewDelegate::didFailProvisionalLoad(
@ -720,11 +693,35 @@ void BrowserWebViewDelegate::didFailProvisionalLoad(
void BrowserWebViewDelegate::didCommitProvisionalLoad( void BrowserWebViewDelegate::didCommitProvisionalLoad(
WebFrame* frame, bool is_new_navigation) { WebFrame* frame, bool is_new_navigation) {
// Determine if this commit represents the main content.
if (frame == top_loading_frame_) {
is_main_content_ = false;
if (is_new_navigation) {
// New navigations will be the main content.
is_main_content_ = true;
} else {
// Session history navigations will be the main content.
BrowserExtraData* extra_data = static_cast<BrowserExtraData*>(
frame->dataSource()->extraData());
if (extra_data && extra_data->pending_page_id != -1 &&
!extra_data->request_committed)
is_main_content_ = true;
}
if (is_main_content_) {
// Clear the title so we can tell if it wasn't provided by the page.
browser_->UIT_SetTitle(std::wstring());
}
}
UpdateForCommittedLoad(frame, is_new_navigation); UpdateForCommittedLoad(frame, is_new_navigation);
CefRefPtr<CefHandler> handler = browser_->GetHandler(); CefRefPtr<CefHandler> handler = browser_->GetHandler();
if(handler.get()) { if(handler.get()) {
// Notify the handler that loading has started // Notify the handler that loading has started.
handler->HandleLoadStart(browser_, browser_->GetCefFrame(frame)); handler->HandleLoadStart(browser_,
(frame == top_loading_frame_) ? NULL : browser_->GetCefFrame(frame),
is_main_content_);
} }
} }
@ -746,12 +743,14 @@ void BrowserWebViewDelegate::didClearWindowObject(WebFrame* frame) {
void BrowserWebViewDelegate::didReceiveTitle( void BrowserWebViewDelegate::didReceiveTitle(
WebFrame* frame, const WebString& title) { WebFrame* frame, const WebString& title) {
CefString titleStr = string16(title); if (frame == top_loading_frame_ && is_main_content_) {
browser_->UIT_SetTitle(titleStr); CefString titleStr = string16(title);
CefRefPtr<CefHandler> handler = browser_->GetHandler(); browser_->UIT_SetTitle(titleStr);
if(handler.get()) { CefRefPtr<CefHandler> handler = browser_->GetHandler();
// Notify the handler of a page title change if(handler.get()) {
handler->HandleTitleChange(browser_, titleStr); // Notify the handler of a page title change
handler->HandleTitleChange(browser_, titleStr);
}
} }
} }
@ -761,13 +760,7 @@ void BrowserWebViewDelegate::didFailLoad(
} }
void BrowserWebViewDelegate::didFinishLoad(WebFrame* frame) { void BrowserWebViewDelegate::didFinishLoad(WebFrame* frame) {
UpdateAddressBar(frame->view());
LocationChangeDone(frame); LocationChangeDone(frame);
CefRefPtr<CefHandler> handler = browser_->GetHandler();
if(handler.get()) {
// Notify the handler that loading has ended
handler->HandleLoadEnd(browser_, browser_->GetCefFrame(frame));
}
} }
void BrowserWebViewDelegate::didChangeLocationWithinPage( void BrowserWebViewDelegate::didChangeLocationWithinPage(
@ -821,6 +814,7 @@ BrowserWebViewDelegate::BrowserWebViewDelegate(CefBrowserImpl* browser)
policy_delegate_should_notify_done_(false), policy_delegate_should_notify_done_(false),
browser_(browser), browser_(browser),
top_loading_frame_(NULL), top_loading_frame_(NULL),
is_main_content_(false),
page_id_(-1), page_id_(-1),
last_page_id_updated_(-1), last_page_id_updated_(-1),
smart_insert_delete_enabled_(true), smart_insert_delete_enabled_(true),
@ -885,12 +879,32 @@ void BrowserWebViewDelegate::WaitForPolicyDelegate() {
// Private methods ----------------------------------------------------------- // Private methods -----------------------------------------------------------
void BrowserWebViewDelegate::UpdateAddressBar(WebView* webView) {
}
void BrowserWebViewDelegate::LocationChangeDone(WebFrame* frame) { void BrowserWebViewDelegate::LocationChangeDone(WebFrame* frame) {
if (frame == top_loading_frame_) CefRefPtr<CefHandler> handler = browser_->GetHandler();
bool is_top_frame = false;
if (frame == top_loading_frame_) {
top_loading_frame_ = NULL; top_loading_frame_ = NULL;
is_top_frame = true;
if(is_main_content_ && handler.get()) {
CefString title = browser_->UIT_GetTitle();
if (title.empty()) {
// No title was provided by the page, so send a blank string to the
// client.
handler->HandleTitleChange(browser_, title);
}
}
}
if(handler.get()) {
// Notify the handler that loading has ended.
handler->HandleLoadEnd(browser_,
(is_top_frame) ? NULL : browser_->GetCefFrame(frame), is_main_content_);
}
if (is_top_frame && is_main_content_)
is_main_content_ = false;
} }
WebWidgetHost* BrowserWebViewDelegate::GetWidgetHost() { WebWidgetHost* BrowserWebViewDelegate::GetWidgetHost() {
@ -902,7 +916,7 @@ WebWidgetHost* BrowserWebViewDelegate::GetWidgetHost() {
} }
void BrowserWebViewDelegate::UpdateForCommittedLoad(WebFrame* frame, void BrowserWebViewDelegate::UpdateForCommittedLoad(WebFrame* frame,
bool is_new_navigation) { bool is_new_navigation) {
// Code duplicated from RenderView::DidCommitLoadForFrame. // Code duplicated from RenderView::DidCommitLoadForFrame.
BrowserExtraData* extra_data = static_cast<BrowserExtraData*>( BrowserExtraData* extra_data = static_cast<BrowserExtraData*>(
frame->dataSource()->extraData()); frame->dataSource()->extraData());
@ -943,12 +957,13 @@ void BrowserWebViewDelegate::UpdateURL(WebFrame* frame) {
entry->SetURL(request.url()); entry->SetURL(request.url());
} }
std::string url = std::string(entry->GetURL().spec().c_str()); if (is_main_content_) {
CefRefPtr<CefHandler> handler = browser_->GetHandler();
CefRefPtr<CefHandler> handler = browser_->GetHandler(); if(handler.get()) {
if(handler.get()) { // Notify the handler of an address change
// Notify the handler of an address change std::string url = std::string(entry->GetURL().spec().c_str());
handler->HandleAddressChange(browser_, browser_->GetCefFrame(frame), url); handler->HandleAddressChange(browser_, browser_->GetCefFrame(frame), url);
}
} }
const WebHistoryItem& history_item = frame->currentHistoryItem(); const WebHistoryItem& history_item = frame->currentHistoryItem();

View File

@ -51,9 +51,9 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
public base::SupportsWeakPtr<BrowserWebViewDelegate> { public base::SupportsWeakPtr<BrowserWebViewDelegate> {
public: public:
// WebKit::WebViewClient // WebKit::WebViewClient
virtual WebKit::WebView* createView(WebKit::WebFrame* creator, virtual WebKit::WebView* createView(
const WebKit::WebWindowFeatures& features, WebKit::WebFrame* creator, const WebKit::WebURLRequest& request,
const WebKit::WebString& name); const WebKit::WebWindowFeatures& features, const WebKit::WebString& name);
virtual WebKit::WebWidget* createPopupMenu(WebKit::WebPopupType popup_type); virtual WebKit::WebWidget* createPopupMenu(WebKit::WebPopupType popup_type);
virtual WebKit::WebWidget* createPopupMenu( virtual WebKit::WebWidget* createPopupMenu(
const WebKit::WebPopupMenuInfo& info); const WebKit::WebPopupMenuInfo& info);
@ -63,8 +63,6 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
const WebKit::WebConsoleMessage& message, const WebKit::WebConsoleMessage& message,
const WebKit::WebString& source_name, unsigned source_line); const WebKit::WebString& source_name, unsigned source_line);
virtual void printPage(WebKit::WebFrame* frame); virtual void printPage(WebKit::WebFrame* frame);
virtual void didStartLoading();
virtual void didStopLoading();
virtual bool shouldBeginEditing(const WebKit::WebRange& range); virtual bool shouldBeginEditing(const WebKit::WebRange& range);
virtual bool shouldEndEditing(const WebKit::WebRange& range); virtual bool shouldEndEditing(const WebKit::WebRange& range);
virtual bool shouldInsertNode( virtual bool shouldInsertNode(
@ -248,9 +246,6 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
CefBrowserImpl* GetBrowser() { return browser_; } CefBrowserImpl* GetBrowser() { return browser_; }
protected: protected:
// Called when the URL of the page changes.
void UpdateAddressBar(WebKit::WebView* webView);
// Default handling of JavaScript messages. // Default handling of JavaScript messages.
void ShowJavaScriptAlert(WebKit::WebFrame* webframe, void ShowJavaScriptAlert(WebKit::WebFrame* webframe,
const CefString& message); const CefString& message);
@ -295,8 +290,10 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
// Non-owning pointer. The delegate is owned by the host. // Non-owning pointer. The delegate is owned by the host.
CefBrowserImpl* browser_; CefBrowserImpl* browser_;
// This is non-NULL IFF a load is in progress. // This is non-NULL if a load is in progress.
WebKit::WebFrame* top_loading_frame_; WebKit::WebFrame* top_loading_frame_;
// This is true if the in-progress load is the main content.
bool is_main_content_;
// For tracking session history. See RenderView. // For tracking session history. See RenderView.
int page_id_; int page_id_;

View File

@ -6,11 +6,11 @@
#include <string> #include <string>
#include "app/clipboard/clipboard.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/string16.h" #include "base/string16.h"
#include "googleurl/src/gurl.h" #include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/clipboard/clipboard.h"
#include "webkit/glue/scoped_clipboard_writer_glue.h" #include "webkit/glue/scoped_clipboard_writer_glue.h"
// Clipboard glue // Clipboard glue
@ -25,26 +25,27 @@ ScopedClipboardWriterGlue::~ScopedClipboardWriterGlue() {
namespace webkit_glue { namespace webkit_glue {
base::LazyInstance<Clipboard> clipboard(base::LINKER_INITIALIZED); base::LazyInstance<ui::Clipboard> clipboard(base::LINKER_INITIALIZED);
Clipboard* ClipboardGetClipboard() { ui::Clipboard* ClipboardGetClipboard() {
return clipboard.Pointer(); return clipboard.Pointer();
} }
bool ClipboardIsFormatAvailable(const Clipboard::FormatType& format, bool ClipboardIsFormatAvailable(const ui::Clipboard::FormatType& format,
Clipboard::Buffer buffer) { ui::Clipboard::Buffer buffer) {
return ClipboardGetClipboard()->IsFormatAvailable(format, buffer); return ClipboardGetClipboard()->IsFormatAvailable(format, buffer);
} }
void ClipboardReadText(Clipboard::Buffer buffer, string16* result) { void ClipboardReadText(ui::Clipboard::Buffer buffer, string16* result) {
ClipboardGetClipboard()->ReadText(buffer, result); ClipboardGetClipboard()->ReadText(buffer, result);
} }
void ClipboardReadAsciiText(Clipboard::Buffer buffer, std::string* result) { void ClipboardReadAsciiText(ui::Clipboard::Buffer buffer, std::string* result) {
ClipboardGetClipboard()->ReadAsciiText(buffer, result); ClipboardGetClipboard()->ReadAsciiText(buffer, result);
} }
void ClipboardReadHTML(Clipboard::Buffer buffer, string16* markup, GURL* url) { void ClipboardReadHTML(ui::Clipboard::Buffer buffer, string16* markup,
GURL* url) {
std::string url_str; std::string url_str;
ClipboardGetClipboard()->ReadHTML(buffer, markup, url ? &url_str : NULL); ClipboardGetClipboard()->ReadHTML(buffer, markup, url ? &url_str : NULL);
if (url) if (url)
@ -52,18 +53,18 @@ void ClipboardReadHTML(Clipboard::Buffer buffer, string16* markup, GURL* url) {
} }
// TODO(dcheng): Implement. // TODO(dcheng): Implement.
bool ClipboardReadAvailableTypes(Clipboard::Buffer buffer, bool ClipboardReadAvailableTypes(ui::Clipboard::Buffer buffer,
std::vector<string16>* types, std::vector<string16>* types,
bool* contains_filenames) { bool* contains_filenames) {
return false; return false;
} }
bool ClipboardReadData(Clipboard::Buffer buffer, const string16& type, bool ClipboardReadData(ui::Clipboard::Buffer buffer, const string16& type,
string16* data, string16* metadata) { string16* data, string16* metadata) {
return false; return false;
} }
bool ClipboardReadFilenames(Clipboard::Buffer buffer, bool ClipboardReadFilenames(ui::Clipboard::Buffer buffer,
std::vector<string16>* filenames) { std::vector<string16>* filenames) {
return false; return false;
} }

View File

@ -29,7 +29,11 @@ WebViewHost* WebViewHost::Create(GtkWidget* parent_view,
host->view_ = WebWidgetHost::CreateWidget(parent_view, host); host->view_ = WebWidgetHost::CreateWidget(parent_view, host);
host->plugin_container_manager_.set_host_widget(host->view_); host->plugin_container_manager_.set_host_widget(host->view_);
#if defined(WEBKIT_HAS_WEB_AUTO_FILL_CLIENT)
host->webwidget_ = WebView::create(delegate, dev_tools_client, NULL);
#else
host->webwidget_ = WebView::create(delegate, dev_tools_client); host->webwidget_ = WebView::create(delegate, dev_tools_client);
#endif
prefs.Apply(host->webview()); prefs.Apply(host->webview());
host->webview()->initializeMainFrame(delegate); host->webview()->initializeMainFrame(delegate);
host->webwidget_->layout(); host->webwidget_->layout();

View File

@ -34,7 +34,11 @@ WebViewHost* WebViewHost::Create(NSView* parent_view,
[parent_view addSubview:host->view_]; [parent_view addSubview:host->view_];
[host->view_ release]; [host->view_ release];
#if defined(WEBKIT_HAS_WEB_AUTO_FILL_CLIENT)
host->webwidget_ = WebView::create(delegate, dev_tools_client, NULL);
#else
host->webwidget_ = WebView::create(delegate, dev_tools_client); host->webwidget_ = WebView::create(delegate, dev_tools_client);
#endif
prefs.Apply(host->webview()); prefs.Apply(host->webview());
host->webview()->initializeMainFrame(delegate); host->webview()->initializeMainFrame(delegate);
host->webwidget_->resize(WebSize(content_rect.size.width, host->webwidget_->resize(WebSize(content_rect.size.width,

View File

@ -42,7 +42,11 @@ WebViewHost* WebViewHost::Create(HWND parent_view,
GetModuleHandle(NULL), NULL); GetModuleHandle(NULL), NULL);
app::win::SetWindowUserData(host->view_, host); app::win::SetWindowUserData(host->view_, host);
#if defined(WEBKIT_HAS_WEB_AUTO_FILL_CLIENT)
host->webwidget_ = WebView::create(delegate, dev_tools_client, NULL);
#else
host->webwidget_ = WebView::create(delegate, dev_tools_client); host->webwidget_ = WebView::create(delegate, dev_tools_client);
#endif
prefs.Apply(host->webview()); prefs.Apply(host->webview());
host->webview()->initializeMainFrame(delegate); host->webview()->initializeMainFrame(delegate);

View File

@ -135,7 +135,8 @@ enum cef_retval_t CEF_CALLBACK handler_handle_before_browse(
} }
enum cef_retval_t CEF_CALLBACK handler_handle_load_start( enum cef_retval_t CEF_CALLBACK handler_handle_load_start(
struct _cef_handler_t* self, cef_browser_t* browser, cef_frame_t* frame) struct _cef_handler_t* self, cef_browser_t* browser, cef_frame_t* frame,
int isMainContent)
{ {
DCHECK(self); DCHECK(self);
DCHECK(browser); DCHECK(browser);
@ -147,11 +148,12 @@ enum cef_retval_t CEF_CALLBACK handler_handle_load_start(
framePtr = CefFrameCToCpp::Wrap(frame); framePtr = CefFrameCToCpp::Wrap(frame);
return CefHandlerCppToC::Get(self)->HandleLoadStart( return CefHandlerCppToC::Get(self)->HandleLoadStart(
CefBrowserCToCpp::Wrap(browser), framePtr); CefBrowserCToCpp::Wrap(browser), framePtr, isMainContent?true:false);
} }
enum cef_retval_t CEF_CALLBACK handler_handle_load_end( enum cef_retval_t CEF_CALLBACK handler_handle_load_end(
struct _cef_handler_t* self, cef_browser_t* browser, cef_frame_t* frame) struct _cef_handler_t* self, cef_browser_t* browser, cef_frame_t* frame,
int isMainContent)
{ {
DCHECK(self); DCHECK(self);
DCHECK(browser); DCHECK(browser);
@ -163,7 +165,7 @@ enum cef_retval_t CEF_CALLBACK handler_handle_load_end(
framePtr = CefFrameCToCpp::Wrap(frame); framePtr = CefFrameCToCpp::Wrap(frame);
return CefHandlerCppToC::Get(self)->HandleLoadEnd( return CefHandlerCppToC::Get(self)->HandleLoadEnd(
CefBrowserCToCpp::Wrap(browser), framePtr); CefBrowserCToCpp::Wrap(browser), framePtr, isMainContent?true:false);
} }
enum cef_retval_t CEF_CALLBACK handler_handle_load_error( enum cef_retval_t CEF_CALLBACK handler_handle_load_error(

View File

@ -98,7 +98,8 @@ CefHandler::RetVal CefHandlerCToCpp::HandleBeforeBrowse(
} }
CefHandler::RetVal CefHandlerCToCpp::HandleLoadStart( CefHandler::RetVal CefHandlerCToCpp::HandleLoadStart(
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame) CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
bool isMainContent)
{ {
if(CEF_MEMBER_MISSING(struct_, handle_load_start)) if(CEF_MEMBER_MISSING(struct_, handle_load_start))
return RV_CONTINUE; return RV_CONTINUE;
@ -108,11 +109,12 @@ CefHandler::RetVal CefHandlerCToCpp::HandleLoadStart(
frameStruct = CefFrameCppToC::Wrap(frame); frameStruct = CefFrameCppToC::Wrap(frame);
return struct_->handle_load_start(struct_, CefBrowserCppToC::Wrap(browser), return struct_->handle_load_start(struct_, CefBrowserCppToC::Wrap(browser),
frameStruct); frameStruct, isMainContent);
} }
CefHandler::RetVal CefHandlerCToCpp::HandleLoadEnd( CefHandler::RetVal CefHandlerCToCpp::HandleLoadEnd(
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame) CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
bool isMainContent)
{ {
if(CEF_MEMBER_MISSING(struct_, handle_load_end)) if(CEF_MEMBER_MISSING(struct_, handle_load_end))
return RV_CONTINUE; return RV_CONTINUE;
@ -122,7 +124,7 @@ CefHandler::RetVal CefHandlerCToCpp::HandleLoadEnd(
frameStruct = CefFrameCppToC::Wrap(frame); frameStruct = CefFrameCppToC::Wrap(frame);
return struct_->handle_load_end(struct_, CefBrowserCppToC::Wrap(browser), return struct_->handle_load_end(struct_, CefBrowserCppToC::Wrap(browser),
frameStruct); frameStruct, isMainContent);
} }
CefHandler::RetVal CefHandlerCToCpp::HandleLoadError( CefHandler::RetVal CefHandlerCToCpp::HandleLoadError(

View File

@ -44,9 +44,9 @@ public:
CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request, CefRefPtr<CefFrame> frame, CefRefPtr<CefRequest> request,
NavType navType, bool isRedirect); NavType navType, bool isRedirect);
virtual RetVal HandleLoadStart(CefRefPtr<CefBrowser> browser, virtual RetVal HandleLoadStart(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame); CefRefPtr<CefFrame> frame, bool isMainContent);
virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser, virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame); CefRefPtr<CefFrame> frame, bool isMainContent);
virtual RetVal HandleLoadError(CefRefPtr<CefBrowser> browser, virtual RetVal HandleLoadError(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame, ErrorCode errorCode, CefRefPtr<CefFrame> frame, ErrorCode errorCode,
const CefString& failedUrl, CefString& errorText); const CefString& failedUrl, CefString& errorText);

View File

@ -60,7 +60,7 @@ CefHandler::RetVal ClientHandler::HandleAfterCreated(
} }
CefHandler::RetVal ClientHandler::HandleLoadStart(CefRefPtr<CefBrowser> browser, CefHandler::RetVal ClientHandler::HandleLoadStart(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) CefRefPtr<CefFrame> frame, bool isMainContent)
{ {
if(!browser->IsPopup() && !frame.get()) if(!browser->IsPopup() && !frame.get())
{ {
@ -75,7 +75,7 @@ CefHandler::RetVal ClientHandler::HandleLoadStart(CefRefPtr<CefBrowser> browser,
} }
CefHandler::RetVal ClientHandler::HandleLoadEnd(CefRefPtr<CefBrowser> browser, CefHandler::RetVal ClientHandler::HandleLoadEnd(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) CefRefPtr<CefFrame> frame, bool isMainContent)
{ {
if(!browser->IsPopup() && !frame.get()) if(!browser->IsPopup() && !frame.get())
{ {
@ -363,3 +363,8 @@ void RunHTML5VideoTest(CefRefPtr<CefBrowser> browser)
browser->GetMainFrame()->LoadURL( browser->GetMainFrame()->LoadURL(
"http://www.youtube.com/watch?v=siOHh0uzcuY&html5=True"); "http://www.youtube.com/watch?v=siOHh0uzcuY&html5=True");
} }
void RunXMLHTTPRequestTest(CefRefPtr<CefBrowser> browser)
{
browser->GetMainFrame()->LoadURL("http://tests/xmlhttprequest");
}

View File

@ -45,10 +45,7 @@ public:
const CefPopupFeatures& popupFeatures, const CefPopupFeatures& popupFeatures,
CefRefPtr<CefHandler>& handler, CefRefPtr<CefHandler>& handler,
CefString& url, CefString& url,
CefBrowserSettings& settings) CefBrowserSettings& settings);
{
return RV_CONTINUE;
}
// Event called after a new window is created. The return value is currently // Event called after a new window is created. The return value is currently
// ignored. // ignored.
@ -78,17 +75,22 @@ public:
// Event called when the browser begins loading a page. The |frame| pointer // Event called when the browser begins loading a page. The |frame| pointer
// will be empty if the event represents the overall load status and not the // will be empty if the event represents the overall load status and not the
// load status for a particular frame. The return value is currently ignored. // load status for a particular frame. |isMainContent| will be true if this
// load is for the main content area and not an iframe. This method may not
// be called if the load request fails. The return value is currently ignored.
virtual RetVal HandleLoadStart(CefRefPtr<CefBrowser> browser, virtual RetVal HandleLoadStart(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame); CefRefPtr<CefFrame> frame,
bool isMainContent);
// Event called when the browser is done loading a page. The |frame| pointer // Event called when the browser is done loading a page. The |frame| pointer
// will be empty if the event represents the overall load status and not the // will be empty if the event represents the overall load status and not the
// load status for a particular frame. This event will be generated // load status for a particular frame. |isMainContent| will be true if this
// irrespective of whether the request completes successfully. The return // load is for the main content area and not an iframe. This method will be
// value is currently ignored. // called irrespective of whether the request completes successfully. The
// return value is currently ignored.
virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser, virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame); CefRefPtr<CefFrame> frame,
bool isMainContent);
// Called when the browser fails to load a resource. |errorCode| is the // Called when the browser fails to load a resource. |errorCode| is the
// error code number and |failedUrl| is the URL that failed to load. To // error code number and |failedUrl| is the URL that failed to load. To
@ -381,5 +383,6 @@ void RunAccelerated2DCanvasTest(CefRefPtr<CefBrowser> browser);
void RunAcceleratedLayersTest(CefRefPtr<CefBrowser> browser); void RunAcceleratedLayersTest(CefRefPtr<CefBrowser> browser);
void RunWebGLTest(CefRefPtr<CefBrowser> browser); void RunWebGLTest(CefRefPtr<CefBrowser> browser);
void RunHTML5VideoTest(CefRefPtr<CefBrowser> browser); void RunHTML5VideoTest(CefRefPtr<CefBrowser> browser);
void RunXMLHTTPRequestTest(CefRefPtr<CefBrowser> browser);
#endif // _CEFCLIENT_H #endif // _CEFCLIENT_H

View File

@ -28,10 +28,11 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// Binary // Binary
// //
IDS_LOGO BINARY "res\logo.png" IDS_LOGO BINARY "res\\logo.png"
IDS_UIPLUGIN BINARY "res\uiplugin.html" IDS_UIPLUGIN BINARY "res\\uiplugin.html"
IDS_LOGOBALL BINARY "res\logoball.png" IDS_LOGOBALL BINARY "res\\logoball.png"
IDS_LOCALSTORAGE BINARY "res\localstorage.html" IDS_LOCALSTORAGE BINARY "res\\localstorage.html"
IDS_XMLHTTPREQUEST BINARY "res\\xmlhttprequest.html"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
@ -75,6 +76,7 @@ BEGIN
MENUITEM "Scheme Handler", ID_TESTS_SCHEME_HANDLER MENUITEM "Scheme Handler", ID_TESTS_SCHEME_HANDLER
MENUITEM "UI App Example", ID_TESTS_UIAPP MENUITEM "UI App Example", ID_TESTS_UIAPP
MENUITEM "Local Storage", ID_TESTS_LOCALSTORAGE MENUITEM "Local Storage", ID_TESTS_LOCALSTORAGE
MENUITEM "XMLHttpRequest", ID_TESTS_XMLHTTPREQUEST
MENUITEM "Accelerated 2D Canvas", ID_TESTS_ACCELERATED2DCANVAS MENUITEM "Accelerated 2D Canvas", ID_TESTS_ACCELERATED2DCANVAS
MENUITEM "Accelerated Layers", ID_TESTS_ACCELERATEDLAYERS MENUITEM "Accelerated Layers", ID_TESTS_ACCELERATEDLAYERS
MENUITEM "WebGL", ID_TESTS_WEBGL MENUITEM "WebGL", ID_TESTS_WEBGL

View File

@ -367,6 +367,14 @@ int main(int argc, char* argv[])
// ClientHandler implementation // ClientHandler implementation
CefHandler::RetVal ClientHandler::HandleBeforeCreated(
CefRefPtr<CefBrowser> parentBrowser, CefWindowInfo& createInfo, bool popup,
const CefPopupFeatures& popupFeatures, CefRefPtr<CefHandler>& handler,
CefString& url, CefBrowserSettings& settings)
{
return RV_CONTINUE;
}
CefHandler::RetVal ClientHandler::HandleAddressChange( CefHandler::RetVal ClientHandler::HandleAddressChange(
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
const CefString& url) const CefString& url)

View File

@ -69,9 +69,6 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
// Specify a cache path value. // Specify a cache path value.
//CefString(&settings.cache_path).FromASCII("c:\\temp\\cache"); //CefString(&settings.cache_path).FromASCII("c:\\temp\\cache");
// Disable accelerated compositing to view HTML5 video.
//browserDefaults.accelerated_compositing_disabled = true;
#ifdef TEST_SINGLE_THREADED_MESSAGE_LOOP #ifdef TEST_SINGLE_THREADED_MESSAGE_LOOP
// Initialize the CEF with messages processed using the current application's // Initialize the CEF with messages processed using the current application's
// message loop. // message loop.
@ -567,6 +564,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if(browser.get()) if(browser.get())
RunHTML5VideoTest(browser); RunHTML5VideoTest(browser);
return 0; return 0;
case ID_TESTS_XMLHTTPREQUEST: // Test XMLHttpRequest
if(browser.get())
RunXMLHTTPRequestTest(browser);
return 0;
} }
} }
break; break;
@ -648,6 +649,25 @@ INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
// ClientHandler implementation // ClientHandler implementation
CefHandler::RetVal ClientHandler::HandleBeforeCreated(
CefRefPtr<CefBrowser> parentBrowser, CefWindowInfo& createInfo, bool popup,
const CefPopupFeatures& popupFeatures, CefRefPtr<CefHandler>& handler,
CefString& url, CefBrowserSettings& settings)
{
if(popup) {
if(popupFeatures.xSet)
createInfo.m_x = popupFeatures.x;
if(popupFeatures.ySet)
createInfo.m_y = popupFeatures.y;
if(popupFeatures.widthSet)
createInfo.m_nWidth = popupFeatures.width;
if(popupFeatures.heightSet)
createInfo.m_nHeight = popupFeatures.height;
}
return RV_CONTINUE;
}
CefHandler::RetVal ClientHandler::HandleAddressChange( CefHandler::RetVal ClientHandler::HandleAddressChange(
CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame,
const CefString& url) const CefString& url)
@ -687,8 +707,8 @@ CefHandler::RetVal ClientHandler::HandleBeforeResourceLoad(
// Show the request contents // Show the request contents
std::string dump; std::string dump;
DumpRequestContents(request, dump); DumpRequestContents(request, dump);
resourceStream = CefStreamReader::CreateForData((void*)dump.c_str(), resourceStream =
dump.size()); CefStreamReader::CreateForData((void*)dump.c_str(), dump.size());
mimeType = "text/plain"; mimeType = "text/plain";
} else if(url == "http://tests/uiapp") { } else if(url == "http://tests/uiapp") {
// Show the uiapp contents // Show the uiapp contents
@ -704,6 +724,13 @@ CefHandler::RetVal ClientHandler::HandleBeforeResourceLoad(
new CefByteReadHandler(pBytes, dwSize, NULL)); new CefByteReadHandler(pBytes, dwSize, NULL));
mimeType = "text/html"; mimeType = "text/html";
} }
} else if(url == "http://tests/xmlhttprequest") {
// Show the xmlhttprequest HTML contents
if(LoadBinaryResource(IDS_XMLHTTPREQUEST, dwSize, pBytes)) {
resourceStream = CefStreamReader::CreateForHandler(
new CefByteReadHandler(pBytes, dwSize, NULL));
mimeType = "text/html";
}
} else if(strstr(url.c_str(), "/ps_logo2.png") != NULL) { } else if(strstr(url.c_str(), "/ps_logo2.png") != NULL) {
// Any time we find "ps_logo2.png" in the URL substitute in our own image // Any time we find "ps_logo2.png" in the URL substitute in our own image
if(LoadBinaryResource(IDS_LOGO, dwSize, pBytes)) { if(LoadBinaryResource(IDS_LOGO, dwSize, pBytes)) {

View File

@ -0,0 +1,18 @@
<html>
<body>
<script language="JavaScript">
function execXMLHttpRequest()
{
xhr = new XMLHttpRequest();
xhr.open("GET","request",false);
xhr.setRequestHeader('My-Custom-Header', 'Some Value');
xhr.send();
document.getElementById('ta').value = "Request\n\n"+xhr.responseText;
}
</script>
<form>
<input type="button" onclick="execXMLHttpRequest();" value="Execute XMLHttpRequest">
<br/><textarea rows="10" cols="40" id="ta"></textarea>
</form>
</body>
</html>

View File

@ -41,11 +41,13 @@
#define ID_TESTS_ACCELERATEDLAYERS 32781 #define ID_TESTS_ACCELERATEDLAYERS 32781
#define ID_TESTS_WEBGL 32782 #define ID_TESTS_WEBGL 32782
#define ID_TESTS_HTML5VIDEO 32783 #define ID_TESTS_HTML5VIDEO 32783
#define ID_TESTS_XMLHTTPREQUEST 32784
#define IDC_STATIC -1 #define IDC_STATIC -1
#define IDS_LOGO 1000 #define IDS_LOGO 1000
#define IDS_UIPLUGIN 1001 #define IDS_UIPLUGIN 1001
#define IDS_LOGOBALL 1002 #define IDS_LOGOBALL 1002
#define IDS_LOCALSTORAGE 1003 #define IDS_LOCALSTORAGE 1003
#define IDS_XMLHTTPREQUEST 1004
// Avoid files associated with MacOS // Avoid files associated with MacOS
#define _X86_ #define _X86_

View File

@ -272,7 +272,8 @@ public:
} }
virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser, virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) CefRefPtr<CefFrame> frame,
bool isMainContent)
{ {
if(!browser->IsPopup() && !frame.get()) if(!browser->IsPopup() && !frame.get())
DestroyTest(); DestroyTest();
@ -380,7 +381,8 @@ public:
} }
virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser, virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) CefRefPtr<CefFrame> frame,
bool isMainContent)
{ {
if(!browser->IsPopup() && !frame.get()) if(!browser->IsPopup() && !frame.get())
{ {

View File

@ -69,13 +69,15 @@ public:
} }
virtual RetVal HandleLoadStart(CefRefPtr<CefBrowser> browser, virtual RetVal HandleLoadStart(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) CefRefPtr<CefFrame> frame,
bool isMainContent)
{ {
return RV_CONTINUE; return RV_CONTINUE;
} }
virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser, virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) CefRefPtr<CefFrame> frame,
bool isMainContent)
{ {
return RV_CONTINUE; return RV_CONTINUE;
} }

View File

@ -247,7 +247,8 @@ public:
} }
virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser, virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame) CefRefPtr<CefFrame> frame,
bool isMainContent)
{ {
if(!browser->IsPopup() && !frame.get()) if(!browser->IsPopup() && !frame.get())
DestroyTest(); DestroyTest();