| 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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |