OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_INSTANT_PAGE_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ |
6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 void SetInputInProgress(bool input_in_progress); | 187 void SetInputInProgress(bool input_in_progress); |
188 | 188 |
189 // Tells the page about new Most Visited data. | 189 // Tells the page about new Most Visited data. |
190 void SendMostVisitedItems( | 190 void SendMostVisitedItems( |
191 const std::vector<InstantMostVisitedItem>& items); | 191 const std::vector<InstantMostVisitedItem>& items); |
192 | 192 |
193 // Tells the page to toggle voice search. | 193 // Tells the page to toggle voice search. |
194 void ToggleVoiceSearch(); | 194 void ToggleVoiceSearch(); |
195 | 195 |
196 protected: | 196 protected: |
197 InstantPage(Delegate* delegate, const std::string& instant_url); | 197 InstantPage(Delegate* delegate, const std::string& instant_url, |
| 198 bool off_the_record); |
198 | 199 |
199 // Sets |web_contents| as the page to communicate with. |web_contents| may be | 200 // Sets |web_contents| as the page to communicate with. |web_contents| may be |
200 // NULL, which effectively stops all communication. | 201 // NULL, which effectively stops all communication. |
201 void SetContents(content::WebContents* web_contents); | 202 void SetContents(content::WebContents* web_contents); |
202 | 203 |
203 Delegate* delegate() const { return delegate_; } | 204 Delegate* delegate() const { return delegate_; } |
204 | 205 |
205 // These functions are called before processing messages received from the | 206 // These functions are called before processing messages received from the |
206 // page. By default, all messages are handled, but any derived classes may | 207 // page. By default, all messages are handled, but any derived classes may |
207 // choose to ignore some or all of the received messages by overriding these | 208 // choose to ignore some or all of the received messages by overriding these |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 WindowOpenDisposition disposition, | 271 WindowOpenDisposition disposition, |
271 bool is_search_type); | 272 bool is_search_type); |
272 void OnDeleteMostVisitedItem(int page_id, const GURL& url); | 273 void OnDeleteMostVisitedItem(int page_id, const GURL& url); |
273 void OnUndoMostVisitedDeletion(int page_id, const GURL& url); | 274 void OnUndoMostVisitedDeletion(int page_id, const GURL& url); |
274 void OnUndoAllMostVisitedDeletions(int page_id); | 275 void OnUndoAllMostVisitedDeletions(int page_id); |
275 | 276 |
276 void ClearContents(); | 277 void ClearContents(); |
277 | 278 |
278 Delegate* const delegate_; | 279 Delegate* const delegate_; |
279 const std::string instant_url_; | 280 const std::string instant_url_; |
| 281 const bool off_the_record_; |
280 | 282 |
281 DISALLOW_COPY_AND_ASSIGN(InstantPage); | 283 DISALLOW_COPY_AND_ASSIGN(InstantPage); |
282 }; | 284 }; |
283 | 285 |
284 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ | 286 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_PAGE_H_ |
OLD | NEW |