Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: chrome/browser/external_tab/external_tab_container_win.h

Issue 9978015: Make browser_handles_top_level_requests synchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ExternalTabContainer::ShouldIgnoreNavigation returns true if is_content_initiated Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/external_tab/external_tab_container_win.h
diff --git a/chrome/browser/external_tab/external_tab_container_win.h b/chrome/browser/external_tab/external_tab_container_win.h
index ed6f20fa92b4bbf47efcf880e2cbd91a701d7bd4..4a66a109835b89a8a5040277be6dbf940b91c462 100644
--- a/chrome/browser/external_tab/external_tab_container_win.h
+++ b/chrome/browser/external_tab/external_tab_container_win.h
@@ -24,6 +24,7 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
+#include "content/public/common/referrer.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/views/widget/native_widget_win.h"
@@ -122,6 +123,13 @@ class ExternalTabContainer : public content::WebContentsDelegate,
virtual content::WebContents* OpenURLFromTab(
content::WebContents* source,
const content::OpenURLParams& params) OVERRIDE;
+ virtual bool ShouldIgnoreNavigation(
+ content::WebContents* source,
+ const GURL& url,
+ const content::Referrer& referrer,
+ WindowOpenDisposition disposition,
+ bool is_content_initiated,
+ content::PageTransition transition_type) OVERRIDE;
virtual void NavigationStateChanged(const content::WebContents* source,
unsigned changed_flags) OVERRIDE;
virtual void AddNewContents(content::WebContents* source,
@@ -280,6 +288,13 @@ class ExternalTabContainer : public content::WebContentsDelegate,
// Creates and initializes the view hierarchy for this ExternalTabContainer.
void SetupExternalTabView();
+ // Send a URL open request to the external host.
+ content::WebContents* OpenUrlInExtenalHost(
+ content::WebContents* source,
+ const GURL& url,
+ WindowOpenDisposition disposition,
+ const content::Referrer& referrer);
+
scoped_ptr<TabContentsWrapper> tab_contents_;
scoped_refptr<AutomationProvider> automation_;
@@ -322,6 +337,11 @@ class ExternalTabContainer : public content::WebContentsDelegate,
// A mapping between accelerators and commands.
std::map<ui::Accelerator, int> accelerator_table_;
+ struct PendingOpenUrlRequest {
+ GURL url;
+ WindowOpenDisposition disposition;
+ content::Referrer referrer;
+ };
// Top level navigations received for a tab while it is waiting for an ack
// from the external host go here. Scenario is a window.open executes on a
// page in ChromeFrame. A new TabContents is created and the current
@@ -333,7 +353,7 @@ class ExternalTabContainer : public content::WebContentsDelegate,
// attach tab request.
// Contains the list of URL requests which are pending waiting for an ack
// from the external host.
- std::vector<content::OpenURLParams> pending_open_url_requests_;
+ std::vector<PendingOpenUrlRequest> pending_open_url_requests_;
// Set to true if the ExternalTabContainer instance is waiting for an ack
// from the host.

Powered by Google App Engine
This is Rietveld 408576698