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

Side by Side Diff: chrome/browser/instant/instant_controller.cc

Issue 11644009: Added support for passing WindowOpenDisposition into BrowserInstantController::OpenURL() from the o… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/instant/instant_controller.h" 5 #include "chrome/browser/instant/instant_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 #else 875 #else
876 if (IsViewInContents(GetViewGainingFocus(view_gaining_focus), 876 if (IsViewInContents(GetViewGainingFocus(view_gaining_focus),
877 loader_->contents())) 877 loader_->contents()))
878 CommitIfPossible(INSTANT_COMMIT_FOCUS_LOST); 878 CommitIfPossible(INSTANT_COMMIT_FOCUS_LOST);
879 else 879 else
880 HideLoader(); 880 HideLoader();
881 #endif 881 #endif
882 } 882 }
883 883
884 void InstantController::NavigateToURL(const GURL& url, 884 void InstantController::NavigateToURL(const GURL& url,
885 content::PageTransition transition) { 885 content::PageTransition transition,
886 WindowOpenDisposition disposition) {
886 if (!extended_enabled_) 887 if (!extended_enabled_)
887 return; 888 return;
888 if (loader_) 889 if (loader_)
889 HideLoader(); 890 HideLoader();
890 browser_->OpenURLInCurrentTab(url, transition); 891 browser_->OpenURL(url, transition, disposition);
891 } 892 }
892 893
893 bool InstantController::ResetLoader(const TemplateURL* template_url, 894 bool InstantController::ResetLoader(const TemplateURL* template_url,
894 const content::WebContents* active_tab, 895 const content::WebContents* active_tab,
895 bool fallback_to_local) { 896 bool fallback_to_local) {
896 std::string instant_url; 897 std::string instant_url;
897 if (!GetInstantURL(template_url, &instant_url)) { 898 if (!GetInstantURL(template_url, &instant_url)) {
898 if (!fallback_to_local || !extended_enabled_) 899 if (!fallback_to_local || !extended_enabled_)
899 return false; 900 return false;
900 901
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 } 1161 }
1161 1162
1162 std::map<std::string, int>::const_iterator iter = 1163 std::map<std::string, int>::const_iterator iter =
1163 blacklisted_urls_.find(*instant_url); 1164 blacklisted_urls_.find(*instant_url);
1164 if (iter != blacklisted_urls_.end() && 1165 if (iter != blacklisted_urls_.end() &&
1165 iter->second > kMaxInstantSupportFailures) 1166 iter->second > kMaxInstantSupportFailures)
1166 return false; 1167 return false;
1167 1168
1168 return true; 1169 return true;
1169 } 1170 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698