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

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

Issue 9978015: Make browser_handles_top_level_requests synchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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.cc
diff --git a/chrome/browser/external_tab/external_tab_container_win.cc b/chrome/browser/external_tab/external_tab_container_win.cc
index d76005913fd9cfc9842ff594cf1692403f42506f..bcf337823ddff35564195210eed793fd5fbd2208 100644
--- a/chrome/browser/external_tab/external_tab_container_win.cc
+++ b/chrome/browser/external_tab/external_tab_container_win.cc
@@ -408,6 +408,23 @@ WebContents* ExternalTabContainer::OpenURLFromTab(WebContents* source,
return NULL;
}
+virtual bool ExternalTabContainer::ShouldIgnoreNavigation(
+ WebContents* source,
+ const GURL& url,
+ const content::Referrer& referrer,
+ WindowOpenDisposition disposition,
+ bool is_content_intiated,
+ content::PageTransition transition_type) {
+ // This will make every navigation browser-initiated.
+ // TODO: Investigate modifying ExternalTabContainer to work without canceling
+ // and re-issuing every navigation.
+
+ if (is_content_intiated)
+ source->GetController().LoadURL(url, params.referrer, transition,
+ std::string());
+ return true;
+}
+
void ExternalTabContainer::NavigationStateChanged(const WebContents* source,
unsigned changed_flags) {
if (automation_) {

Powered by Google App Engine
This is Rietveld 408576698