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

Side by Side Diff: chrome/browser/ui/views/search_view_controller.cc

Issue 10944016: Switch SearchTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const Created 8 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/views/search_view_controller.h" 5 #include "chrome/browser/ui/views/search_view_controller.h"
6 6
7 #include "chrome/browser/instant/instant_controller.h" 7 #include "chrome/browser/instant/instant_controller.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/search_engines/search_engine_type.h" 9 #include "chrome/browser/search_engines/search_engine_type.h"
10 #include "chrome/browser/search_engines/template_url.h" 10 #include "chrome/browser/search_engines/template_url.h"
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 } 594 }
595 } 595 }
596 596
597 void SearchViewController::MaybeHideOverlay() { 597 void SearchViewController::MaybeHideOverlay() {
598 search_container_->SetVisible( 598 search_container_->SetVisible(
599 !InstantController::IsInstantEnabled( 599 !InstantController::IsInstantEnabled(
600 Profile::FromBrowserContext(browser_context_))); 600 Profile::FromBrowserContext(browser_context_)));
601 } 601 }
602 602
603 chrome::search::SearchModel* SearchViewController::search_model() { 603 chrome::search::SearchModel* SearchViewController::search_model() {
604 return tab_contents_ ? tab_contents_->search_tab_helper()->model() : NULL; 604 return tab_contents_ ? chrome::search::SearchTabHelper::FromWebContents(
605 tab_contents_->web_contents())->model()
606 : NULL;
605 } 607 }
606 608
607 content::WebContents* SearchViewController::web_contents() { 609 content::WebContents* SearchViewController::web_contents() {
608 return tab_contents_ ? tab_contents_->web_contents() : NULL; 610 return tab_contents_ ? tab_contents_->web_contents() : NULL;
609 } 611 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698