| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |