- HandleAddressChange and HandleTitleChange will always be called for the main frame and only the main frame (issue #200).

- The |frame| parameter to HandleLoadStart and HandleLoadEnd will always be non-empty. The CefFrame::IsMain() method can be used to check if the notification is for the main frame. The |isMainContent| parameter has been removed.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@202 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-03-08 19:33:18 +00:00
parent 11b831119a
commit 327ad9d9de
16 changed files with 85 additions and 185 deletions

View File

@@ -63,11 +63,11 @@ CefHandler::RetVal ClientHandler::HandleAfterCreated(
}
CefHandler::RetVal ClientHandler::HandleLoadStart(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame, bool isMainContent)
CefRefPtr<CefFrame> frame)
{
REQUIRE_UI_THREAD();
if(!browser->IsPopup() && !frame.get())
if(!browser->IsPopup() && frame->IsMain())
{
Lock();
// We've just started loading a page
@@ -80,11 +80,11 @@ CefHandler::RetVal ClientHandler::HandleLoadStart(CefRefPtr<CefBrowser> browser,
}
CefHandler::RetVal ClientHandler::HandleLoadEnd(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame, bool isMainContent, int httpStatusCode)
CefRefPtr<CefFrame> frame, int httpStatusCode)
{
REQUIRE_UI_THREAD();
if(!browser->IsPopup() && !frame.get())
if(!browser->IsPopup() && frame->IsMain())
{
Lock();
// We've just finished loading a page
@@ -92,7 +92,6 @@ CefHandler::RetVal ClientHandler::HandleLoadEnd(CefRefPtr<CefBrowser> browser,
m_bCanGoBack = browser->CanGoBack();
m_bCanGoForward = browser->CanGoForward();
CefRefPtr<CefFrame> frame = browser->GetMainFrame();
CefRefPtr<CefDOMVisitor> visitor = GetDOMVisitor(frame->GetURL());
if(visitor.get())
frame->VisitDOM(visitor);

View File

@@ -80,25 +80,24 @@ public:
return RV_CONTINUE;
}
// Called on the UI thread when the browser begins loading a page. The |frame|
// pointer will be empty if the event represents the overall load status and
// not the 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.
// Called on the UI thread when the browser begins loading a frame. The
// |frame| value will never be empty -- call the IsMain() method to check if
// this frame is the main frame. Multiple frames may be loading at the same
// time. Sub-frames may start or continue loading after the main frame load
// has ended. This method may not be called for a particular frame if the load
// request for that frame fails. The return value is currently ignored.
virtual RetVal HandleLoadStart(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
bool isMainContent);
CefRefPtr<CefFrame> frame);
// Called on the UI thread 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 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 will be called irrespective of whether the request completes
// successfully. The return value is currently ignored.
// Called on the UI thread when the browser is done loading a frame. The
// |frame| value will never be empty -- call the IsMain() method to check if
// this frame is the main frame. Multiple frames may be loading at the same
// time. Sub-frames may start or continue loading after the main frame load
// has ended. This method will always be called for all frames irrespective of
// whether the request completes successfully. The return value is currently
// ignored.
virtual RetVal HandleLoadEnd(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
bool isMainContent,
int httpStatusCode);
// Called on the UI thread when the browser fails to load a resource.