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

Side by Side 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: fix build error 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/external_tab/external_tab_container_win.h" 5 #include "chrome/browser/external_tab/external_tab_container_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 } 401 }
402 break; 402 break;
403 default: 403 default:
404 NOTREACHED(); 404 NOTREACHED();
405 break; 405 break;
406 } 406 }
407 407
408 return NULL; 408 return NULL;
409 } 409 }
410 410
411 bool ExternalTabContainer::ShouldIgnoreNavigation(
412 WebContents* source,
413 const GURL& url,
414 const content::Referrer& referrer,
415 WindowOpenDisposition disposition,
416 bool is_content_intiated,
Charlie Reis 2012/04/05 17:06:53 nit: initiated
mkosiba (inactive) 2012/04/10 17:58:37 Done.
417 content::PageTransition transition_type) {
418 // This will make every navigation browser-initiated.
419 // TODO: Investigate modifying ExternalTabContainer to work without canceling
420 // and re-issuing every navigation.
Charlie Reis 2012/04/05 17:06:53 This TODO seems critical. We can't treat every li
mkosiba (inactive) 2012/04/10 17:58:37 This is exactly how browser_handles_top_level_requ
421
422 if (is_content_intiated)
423 source->GetController().LoadURL(url, referrer, transition_type,
424 std::string());
425 return true;
426 }
427
411 void ExternalTabContainer::NavigationStateChanged(const WebContents* source, 428 void ExternalTabContainer::NavigationStateChanged(const WebContents* source,
412 unsigned changed_flags) { 429 unsigned changed_flags) {
413 if (automation_) { 430 if (automation_) {
414 NavigationInfo nav_info; 431 NavigationInfo nav_info;
415 if (InitNavigationInfo(&nav_info, content::NAVIGATION_TYPE_NAV_IGNORE, 0)) 432 if (InitNavigationInfo(&nav_info, content::NAVIGATION_TYPE_NAV_IGNORE, 0))
416 automation_->Send(new AutomationMsg_NavigationStateChanged( 433 automation_->Send(new AutomationMsg_NavigationStateChanged(
417 tab_handle_, changed_flags, nav_info)); 434 tab_handle_, changed_flags, nav_info));
418 } 435 }
419 } 436 }
420 437
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 if (params.disposition == CURRENT_TAB) { 1226 if (params.disposition == CURRENT_TAB) {
1210 DCHECK(route_all_top_level_navigations_); 1227 DCHECK(route_all_top_level_navigations_);
1211 forward_params.disposition = NEW_FOREGROUND_TAB; 1228 forward_params.disposition = NEW_FOREGROUND_TAB;
1212 } 1229 }
1213 WebContents* new_contents = 1230 WebContents* new_contents =
1214 ExternalTabContainer::OpenURLFromTab(source, forward_params); 1231 ExternalTabContainer::OpenURLFromTab(source, forward_params);
1215 // support only one navigation for a dummy tab before it is killed. 1232 // support only one navigation for a dummy tab before it is killed.
1216 ::DestroyWindow(GetNativeView()); 1233 ::DestroyWindow(GetNativeView());
1217 return new_contents; 1234 return new_contents;
1218 } 1235 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698