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

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

Issue 23455047: InstantExtended: Send search URLs to renderers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More browsertest fixes Created 7 years, 2 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 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 "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_web_ui.h" 9 #include "chrome/browser/extensions/extension_web_ui.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 if (!instant_service) 281 if (!instant_service)
282 return; 282 return;
283 283
284 TabStripModel* tab_model = browser_->tab_strip_model(); 284 TabStripModel* tab_model = browser_->tab_strip_model();
285 int count = tab_model->count(); 285 int count = tab_model->count();
286 for (int index = 0; index < count; ++index) { 286 for (int index = 0; index < count; ++index) {
287 content::WebContents* contents = tab_model->GetWebContentsAt(index); 287 content::WebContents* contents = tab_model->GetWebContentsAt(index);
288 if (!contents) 288 if (!contents)
289 continue; 289 continue;
290 290
291 if (!instant_service->IsInstantProcess( 291 // Send new search URLs to the renderer.
292 contents->GetRenderProcessHost()->GetID())) 292 content::RenderProcessHost* rph = contents->GetRenderProcessHost();
293 continue; 293 instant_service->SendSearchURLsToRenderer(rph);
294 294
295 // Reload the contents to ensure that it gets assigned to a non-priviledged 295 // Reload the contents to ensure that it gets assigned to a non-priviledged
296 // renderer. 296 // renderer.
297 if (!instant_service->IsInstantProcess(rph->GetID()))
298 continue;
297 contents->GetController().Reload(false); 299 contents->GetController().Reload(false);
298 } 300 }
299 } 301 }
OLDNEW
« no previous file with comments | « chrome/browser/search/search_unittest.cc ('k') | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698