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

Unified Diff: chrome/browser/ui/browser.cc

Issue 2739943005: Cleanup: Remove SearchTabHelperDelegate (Closed)
Patch Set: review Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/search/search_tab_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index c4c4a2dbd2e1975c17fed4a63aee373337d66b92..e92315d812853b980f237d01afb2b4768f7621e2 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -962,9 +962,9 @@ void Browser::TabInsertedAt(TabStripModel* tab_strip_model,
bool foreground) {
SetAsDelegate(contents, true);
- SessionTabHelper* session_tab_helper =
- SessionTabHelper::FromWebContents(contents);
- session_tab_helper->SetWindowID(session_id());
+ SessionTabHelper::FromWebContents(contents)->SetWindowID(session_id());
+
+ SearchTabHelper::FromWebContents(contents)->OnTabAttachedToWindow(window_);
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_TAB_PARENTED,
@@ -1983,13 +1983,6 @@ bool Browser::CanSaveContents(content::WebContents* web_contents) const {
}
///////////////////////////////////////////////////////////////////////////////
-// Browser, SearchTabHelperDelegate implementation:
-
-OmniboxView* Browser::GetOmniboxView() {
- return window_->GetLocationBar()->GetOmniboxView();
-}
-
-///////////////////////////////////////////////////////////////////////////////
// Browser, web_modal::WebContentsModalDialogManagerDelegate implementation:
void Browser::SetWebContentsBlocked(content::WebContents* web_contents,
@@ -2429,7 +2422,6 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
WebContentsModalDialogManager::FromWebContents(web_contents)->
SetDelegate(delegate);
CoreTabHelper::FromWebContents(web_contents)->set_delegate(delegate);
- SearchTabHelper::FromWebContents(web_contents)->set_delegate(delegate);
translate::ContentTranslateDriver& content_translate_driver =
ChromeTranslateClient::FromWebContents(web_contents)->translate_driver();
if (delegate) {
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/search/search_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698