summaryrefslogtreecommitdiffstats
path: root/chrome/browser/external_tab_container.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-19 18:41:31 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-19 18:41:31 +0000
commit2e39d2ebf7e388595bd7fe17d99e30e8a35a43fc (patch)
tree88d7dc914fed1e9303b05a5bc4f2a454c066872f /chrome/browser/external_tab_container.h
parent1933eb200c4bb16e4df535d779c98561f85c1e25 (diff)
downloadchromium_src-2e39d2ebf7e388595bd7fe17d99e30e8a35a43fc.zip
chromium_src-2e39d2ebf7e388595bd7fe17d99e30e8a35a43fc.tar.gz
chromium_src-2e39d2ebf7e388595bd7fe17d99e30e8a35a43fc.tar.bz2
Send over the HTTP status code in the ViewHostMsg_FrameNavigate message coming in from the renderer.
A failed HTTP navigation like a 404 response to a request is followed by two responses. The first one which is associated with the failed response. This does not send over any information about the failure to the browser and thus appears as a normal navigation.The second response is for the actual 404 page being loaded. For network errors the browser does get notified via RenderView::DidFailProvisionalLoadWithError. However due to a prototype mismatch the corresponding function in WebContents is never invoked. Added a new automation message AutomationMsg_NavigationFailed, which carries information about failed navigations to automation clients.The changes to the navigation controller include sending over the http status code and the URL to observers. The ExternalTabContainer also subscribes to the FAIL_PROVISIONAL_LOAD_WITH_ERROR notification, so it can inform clients about errors. We also ignore the next NAV_ENTRY_COMMITTED notification after an error due to the reasons mentioned above. Review URL: http://codereview.chromium.org/21495 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10023 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/external_tab_container.h')
-rw-r--r--chrome/browser/external_tab_container.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/chrome/browser/external_tab_container.h b/chrome/browser/external_tab_container.h
index 7aaca7f..f82c40f 100644
--- a/chrome/browser/external_tab_container.h
+++ b/chrome/browser/external_tab_container.h
@@ -9,6 +9,7 @@
#include <atlapp.h>
#include <atlcrack.h>
#include <atlmisc.h>
+#include <string>
#include "base/basictypes.h"
#include "chrome/browser/tab_contents/tab_contents_delegate.h"
@@ -80,16 +81,18 @@ class ExternalTabContainer : public TabContentsDelegate,
virtual void ToolbarSizeChanged(TabContents* source, bool is_animating);
virtual void ForwardMessageToExternalHost(const std::string& receiver,
const std::string& message);
- virtual bool IsExternalTabContainer() const { return true; };
+ virtual bool IsExternalTabContainer() const {
+ return true;
+ };
// Notification service callback.
virtual void Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details);
- ////////////////////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////////////////
// views::Widget
- ////////////////////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////////////////
virtual void GetBounds(gfx::Rect* out, bool including_frame) const;
virtual void MoveToFront(bool should_activate);
virtual HWND GetHWND() const;
@@ -115,7 +118,7 @@ class ExternalTabContainer : public TabContentsDelegate,
// message it did not process
void ProcessUnhandledAccelerator(const MSG& msg);
- // See TabContents::SetInitialFocus
+ // See TabContents::SetInitialFocus
void SetInitialFocus(bool reverse);
// A helper method that tests whether the given window is an
@@ -146,6 +149,12 @@ class ExternalTabContainer : public TabContentsDelegate,
// A view to handle focus cycling
TabContentsContainerView* tab_contents_container_;
private:
+ // A failed navigation like a 404 is followed in chrome with a success
+ // navigation for the 404 page. We need to ignore the next navigation
+ // to avoid confusing the clients of the external tab. This member variable
+ // is set when we need to ignore the next load notification.
+ bool ignore_next_load_notification_;
+
DISALLOW_COPY_AND_ASSIGN(ExternalTabContainer);
};