| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 64 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 65 | 65 |
| 66 // Sets the mode of the model based on the current URL of web_contents(). | 66 // Sets the mode of the model based on the current URL of web_contents(). |
| 67 void UpdateMode(); | 67 void UpdateMode(); |
| 68 | 68 |
| 69 // Handlers for SearchBox API to show and hide top bars (bookmark and info | 69 // Handlers for SearchBox API to show and hide top bars (bookmark and info |
| 70 // bars). | 70 // bars). |
| 71 void OnSearchBoxShowBars(int page_id); | 71 void OnSearchBoxShowBars(int page_id); |
| 72 void OnSearchBoxHideBars(int page_id); | 72 void OnSearchBoxHideBars(int page_id); |
| 73 | 73 |
| 74 // Sets whether the page supports voice search on the model. |
| 75 void OnSetVoiceSearchSupported(int page_id, bool supported); |
| 76 |
| 74 const bool is_search_enabled_; | 77 const bool is_search_enabled_; |
| 75 | 78 |
| 76 // Tracks the last value passed to OmniboxEditModelChanged(). | 79 // Tracks the last value passed to OmniboxEditModelChanged(). |
| 77 bool user_input_in_progress_; | 80 bool user_input_in_progress_; |
| 78 bool popup_is_open_; | 81 bool popup_is_open_; |
| 79 bool user_text_is_empty_; | 82 bool user_text_is_empty_; |
| 80 | 83 |
| 81 // Model object for UI that cares about search state. | 84 // Model object for UI that cares about search state. |
| 82 SearchModel model_; | 85 SearchModel model_; |
| 83 | 86 |
| 84 content::NotificationRegistrar registrar_; | 87 content::NotificationRegistrar registrar_; |
| 85 | 88 |
| 86 content::WebContents* web_contents_; | 89 content::WebContents* web_contents_; |
| 87 | 90 |
| 88 // Tracks the last set of most visited items sent to the InstantPage renderer. | 91 // Tracks the last set of most visited items sent to the InstantPage renderer. |
| 89 // Used to prevent sending duplicate IPC messages to the renderer. | 92 // Used to prevent sending duplicate IPC messages to the renderer. |
| 90 std::vector<InstantMostVisitedItem> last_known_most_visited_items_; | 93 std::vector<InstantMostVisitedItem> last_known_most_visited_items_; |
| 91 | 94 |
| 92 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); | 95 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); |
| 93 }; | 96 }; |
| 94 | 97 |
| 95 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 98 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| OLD | NEW |