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

Side by Side Diff: chrome/browser/ui/browser_instant_controller.cc

Issue 17114002: Field trial removing tiles from NTP if URL is already open - for 1993 clients (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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
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/ui/browser_instant_controller.h" 5 #include "chrome/browser/ui/browser_instant_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_web_ui.h" 10 #include "chrome/browser/extensions/extension_web_ui.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 if (search_terms.empty()) 152 if (search_terms.empty())
153 return false; 153 return false;
154 154
155 return instant_.SubmitQuery(search_terms); 155 return instant_.SubmitQuery(search_terms);
156 } 156 }
157 157
158 Profile* BrowserInstantController::profile() const { 158 Profile* BrowserInstantController::profile() const {
159 return browser_->profile(); 159 return browser_->profile();
160 } 160 }
161 161
162 TabStripModel* BrowserInstantController::tab_strip_model() const {
163 return browser_->tab_strip_model();
164 }
165
162 void BrowserInstantController::CommitInstant( 166 void BrowserInstantController::CommitInstant(
163 scoped_ptr<content::WebContents> overlay, 167 scoped_ptr<content::WebContents> overlay,
164 bool in_new_tab) { 168 bool in_new_tab) {
165 const extensions::Extension* extension = 169 const extensions::Extension* extension =
166 profile()->GetExtensionService()->GetInstalledApp(overlay->GetURL()); 170 profile()->GetExtensionService()->GetInstalledApp(overlay->GetURL());
167 if (extension) { 171 if (extension) {
168 AppLauncherHandler::RecordAppLaunchType( 172 AppLauncherHandler::RecordAppLaunchType(
169 extension_misc::APP_LAUNCH_OMNIBOX_INSTANT, 173 extension_misc::APP_LAUNCH_OMNIBOX_INSTANT,
170 extension->GetType()); 174 extension->GetType());
171 } 175 }
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 if (!instant_service->IsInstantProcess( 432 if (!instant_service->IsInstantProcess(
429 contents->GetRenderProcessHost()->GetID())) 433 contents->GetRenderProcessHost()->GetID()))
430 continue; 434 continue;
431 435
432 // Reload the contents to ensure that it gets assigned to a non-priviledged 436 // Reload the contents to ensure that it gets assigned to a non-priviledged
433 // renderer. 437 // renderer.
434 contents->GetController().Reload(false); 438 contents->GetController().Reload(false);
435 } 439 }
436 instant_.OnDefaultSearchProviderChanged(); 440 instant_.OnDefaultSearchProviderChanged();
437 } 441 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698