| OLD | NEW |
| 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 } | 596 } |
| 597 } | 597 } |
| 598 | 598 |
| 599 void SearchViewController::MaybeHideOverlay() { | 599 void SearchViewController::MaybeHideOverlay() { |
| 600 search_container_->SetVisible( | 600 search_container_->SetVisible( |
| 601 !InstantController::IsInstantEnabled( | 601 !InstantController::IsInstantEnabled( |
| 602 Profile::FromBrowserContext(browser_context_))); | 602 Profile::FromBrowserContext(browser_context_))); |
| 603 } | 603 } |
| 604 | 604 |
| 605 chrome::search::SearchModel* SearchViewController::search_model() { | 605 chrome::search::SearchModel* SearchViewController::search_model() { |
| 606 return tab_contents_ ? tab_contents_->search_tab_helper()->model() : NULL; | 606 return tab_contents_ ? chrome::search::SearchTabHelper::FromWebContents( |
| 607 tab_contents_->web_contents())->model() |
| 608 : NULL; |
| 607 } | 609 } |
| 608 | 610 |
| 609 content::WebContents* SearchViewController::web_contents() { | 611 content::WebContents* SearchViewController::web_contents() { |
| 610 return tab_contents_ ? tab_contents_->web_contents() : NULL; | 612 return tab_contents_ ? tab_contents_->web_contents() : NULL; |
| 611 } | 613 } |
| OLD | NEW |