Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index b4ef1c2bbf0e87f86d01122d49e8f88b50241170..a3b32952b687ba14bed15baf7852716a64a9e095 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -59,6 +59,7 @@ |
#include "chrome/browser/file_select_helper.h" |
#include "chrome/browser/first_run/first_run.h" |
#include "chrome/browser/google/google_url_tracker.h" |
+#include "chrome/browser/history/top_sites.h" |
#include "chrome/browser/infobars/infobar_service.h" |
#include "chrome/browser/infobars/simple_alert_infobar_delegate.h" |
#include "chrome/browser/lifetime/application_lifetime.h" |
@@ -131,6 +132,7 @@ |
#include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
#include "chrome/browser/ui/tabs/tab_menu_model.h" |
#include "chrome/browser/ui/tabs/tab_strip_model.h" |
+#include "chrome/browser/ui/tabs/tab_strip_model_utils.h" |
#include "chrome/browser/ui/toolbar/toolbar_model_impl.h" |
#include "chrome/browser/ui/unload_controller.h" |
#include "chrome/browser/ui/validation_message_bubble.h" |
@@ -773,12 +775,6 @@ void Browser::VisibleSSLStateChanged(content::WebContents* web_contents) { |
UpdateToolbar(false); |
} |
-void Browser::OnWebContentsInstantSupportDisabled( |
- const content::WebContents* web_contents) { |
- DCHECK(web_contents); |
- if (tab_strip_model_->GetActiveWebContents() == web_contents) |
- UpdateToolbar(false); |
-} |
/////////////////////////////////////////////////////////////////////////////// |
// Browser, Assorted browser commands: |
@@ -1754,6 +1750,42 @@ void Browser::ConfirmAddSearchProvider(TemplateURL* template_url, |
} |
/////////////////////////////////////////////////////////////////////////////// |
+// Browser, SearchTabHelperDelegate implementation: |
+ |
+void Browser::NavigateToURL(const GURL& url, |
+ WindowOpenDisposition disposition, |
+ content::WebContents* source_contents) { |
+ DCHECK(source_contents); |
+ chrome::NavigateParams params(this, url, |
+ content::PAGE_TRANSITION_AUTO_BOOKMARK); |
+ params.referrer = content::Referrer(); |
+ params.source_contents = source_contents; |
+ params.disposition = disposition; |
+ params.is_renderer_initiated = false; |
+ params.initiating_profile = profile_; |
+ chrome::Navigate(¶ms); |
+} |
+ |
+void Browser::OnWebContentsInstantSupportDisabled( |
+ const content::WebContents* web_contents) { |
+ DCHECK(web_contents); |
+ if (tab_strip_model_->GetActiveWebContents() == web_contents) |
+ UpdateToolbar(false); |
+} |
+ |
+OmniboxView* Browser::GetOmniboxView() { |
+ return window_ ? window_->GetLocationBar()->GetOmniboxView() : NULL; |
+} |
+ |
+std::set<std::string> Browser::GetOpenUrls() { |
+ history::TopSites* top_sites = profile_->GetTopSites(); |
+ DCHECK(top_sites); |
Peter Kasting
2014/04/08 21:45:46
Hmm. In this case maybe we should simplify even m
kmadhusu
2014/04/09 00:00:42
Same here. As of now, this function is called only
|
+ std::set<std::string> open_urls; |
+ chrome::GetOpenUrls(*tab_strip_model_, *top_sites, &open_urls); |
+ return open_urls; |
+} |
+ |
+/////////////////////////////////////////////////////////////////////////////// |
// Browser, web_modal::WebContentsModalDialogManagerDelegate implementation: |
void Browser::SetWebContentsBlocked(content::WebContents* web_contents, |
@@ -2136,6 +2168,7 @@ void Browser::SetAsDelegate(WebContents* web_contents, Browser* delegate) { |
SetDelegate(delegate); |
CoreTabHelper::FromWebContents(web_contents)->set_delegate(delegate); |
SearchEngineTabHelper::FromWebContents(web_contents)->set_delegate(delegate); |
+ SearchTabHelper::FromWebContents(web_contents)->set_delegate(delegate); |
ZoomController::FromWebContents(web_contents)->set_observer(delegate); |
TranslateTabHelper* translate_tab_helper = |
TranslateTabHelper::FromWebContents(web_contents); |