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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 void DetermineIfPageSupportsInstant(); | 100 void DetermineIfPageSupportsInstant(); |
101 | 101 |
102 // Handler for when Instant support has been determined. | 102 // Handler for when Instant support has been determined. |
103 void OnInstantSupportDetermined(int page_id, bool supports_instant); | 103 void OnInstantSupportDetermined(int page_id, bool supports_instant); |
104 | 104 |
105 // Handlers for SearchBox API to show and hide top bars (bookmark and info | 105 // Handlers for SearchBox API to show and hide top bars (bookmark and info |
106 // bars). | 106 // bars). |
107 void OnSearchBoxShowBars(int page_id); | 107 void OnSearchBoxShowBars(int page_id); |
108 void OnSearchBoxHideBars(int page_id); | 108 void OnSearchBoxHideBars(int page_id); |
109 | 109 |
| 110 // Sets whether the page supports voice search on the model. |
| 111 void OnSetVoiceSearchSupported(int page_id, bool supported); |
| 112 |
110 const bool is_search_enabled_; | 113 const bool is_search_enabled_; |
111 | 114 |
112 // Tracks the last value passed to OmniboxEditModelChanged(). | 115 // Tracks the last value passed to OmniboxEditModelChanged(). |
113 bool user_input_in_progress_; | 116 bool user_input_in_progress_; |
114 bool popup_is_open_; | 117 bool popup_is_open_; |
115 bool user_text_is_empty_; | 118 bool user_text_is_empty_; |
116 | 119 |
117 // Model object for UI that cares about search state. | 120 // Model object for UI that cares about search state. |
118 SearchModel model_; | 121 SearchModel model_; |
119 | 122 |
120 content::NotificationRegistrar registrar_; | 123 content::NotificationRegistrar registrar_; |
121 | 124 |
122 content::WebContents* web_contents_; | 125 content::WebContents* web_contents_; |
123 | 126 |
124 // Tracks the last set of most visited items sent to the InstantPage renderer. | 127 // Tracks the last set of most visited items sent to the InstantPage renderer. |
125 // Used to prevent sending duplicate IPC messages to the renderer. | 128 // Used to prevent sending duplicate IPC messages to the renderer. |
126 std::vector<InstantMostVisitedItem> last_known_most_visited_items_; | 129 std::vector<InstantMostVisitedItem> last_known_most_visited_items_; |
127 | 130 |
128 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); | 131 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); |
129 }; | 132 }; |
130 | 133 |
131 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 134 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
OLD | NEW |