Chromium Code Reviews| 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/infobars/infobar_service.h" | |
| 8 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/search/instant_service.h" | 10 #include "chrome/browser/search/instant_service.h" |
| 10 #include "chrome/browser/search/instant_service_factory.h" | 11 #include "chrome/browser/search/instant_service_factory.h" |
| 11 #include "chrome/browser/search/search.h" | 12 #include "chrome/browser/search/search.h" |
| 12 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/browser/ui/browser_window.h" | 14 #include "chrome/browser/ui/browser_window.h" |
| 14 #include "chrome/browser/ui/location_bar/location_bar.h" | 15 #include "chrome/browser/ui/location_bar/location_bar.h" |
| 15 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" | 16 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" |
| 16 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 17 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
| 17 #include "chrome/browser/ui/search/instant_search_prerenderer.h" | 18 #include "chrome/browser/ui/search/instant_search_prerenderer.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 continue; | 154 continue; |
| 154 | 155 |
| 155 // Send new search URLs to the renderer. | 156 // Send new search URLs to the renderer. |
| 156 content::RenderProcessHost* rph = contents->GetRenderProcessHost(); | 157 content::RenderProcessHost* rph = contents->GetRenderProcessHost(); |
| 157 instant_service->SendSearchURLsToRenderer(rph); | 158 instant_service->SendSearchURLsToRenderer(rph); |
| 158 | 159 |
| 159 // Reload the contents to ensure that it gets assigned to a non-priviledged | 160 // Reload the contents to ensure that it gets assigned to a non-priviledged |
| 160 // renderer. | 161 // renderer. |
| 161 if (!instant_service->IsInstantProcess(rph->GetID())) | 162 if (!instant_service->IsInstantProcess(rph->GetID())) |
| 162 continue; | 163 continue; |
| 164 | |
| 163 contents->GetController().Reload(false); | 165 contents->GetController().Reload(false); |
|
Peter Kasting
2014/09/18 17:48:04
Nit: Maybe add a comment about whether the order o
sky
2014/09/18 19:22:27
Done.
| |
| 166 | |
| 167 InfoBarService* info_bar_service = | |
|
Peter Kasting
2014/09/18 17:48:05
Nit: Consider adding a comment here about why we w
sky
2014/09/18 19:22:27
Done.
| |
| 168 InfoBarService::FromWebContents(contents); | |
|
Peter Kasting
2014/09/18 17:48:05
Can this actually be NULL? If so add a comment ab
sky
2014/09/18 19:22:27
You're right, it can't. Nuked.
| |
| 169 if (info_bar_service) | |
| 170 info_bar_service->set_ignore_next_reload(); | |
| 164 } | 171 } |
| 165 } | 172 } |
| OLD | NEW |