| 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_SEARCH_IPC_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ |
| 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 // Called when the SearchBox wants to delete a Most Visited item. | 53 // Called when the SearchBox wants to delete a Most Visited item. |
| 54 virtual void OnDeleteMostVisitedItem(const GURL& url) = 0; | 54 virtual void OnDeleteMostVisitedItem(const GURL& url) = 0; |
| 55 | 55 |
| 56 // Called when the SearchBox wants to undo a Most Visited deletion. | 56 // Called when the SearchBox wants to undo a Most Visited deletion. |
| 57 virtual void OnUndoMostVisitedDeletion(const GURL& url) = 0; | 57 virtual void OnUndoMostVisitedDeletion(const GURL& url) = 0; |
| 58 | 58 |
| 59 // Called when the SearchBox wants to undo all Most Visited deletions. | 59 // Called when the SearchBox wants to undo all Most Visited deletions. |
| 60 virtual void OnUndoAllMostVisitedDeletions() = 0; | 60 virtual void OnUndoAllMostVisitedDeletions() = 0; |
| 61 | 61 |
| 62 // Called to signal that an event has occurred on the New Tab Page. | 62 // Called to signal that an event has occurred on the New Tab Page at a |
| 63 virtual void OnLogEvent(NTPLoggingEventType event) = 0; | 63 // particular time since navigation start. |
| 64 virtual void OnLogEvent(NTPLoggingEventType event, int64 time) = 0; |
| 64 | 65 |
| 65 // Called to log an impression from a given provider on the New Tab Page. | 66 // Called to log an impression from a given provider on the New Tab Page. |
| 66 virtual void OnLogMostVisitedImpression(int position, | 67 virtual void OnLogMostVisitedImpression(int position, |
| 67 const base::string16& provider) = 0; | 68 const base::string16& provider) = 0; |
| 68 | 69 |
| 69 // Called to log a navigation from a given provider on the New Tab Page. | 70 // Called to log a navigation from a given provider on the New Tab Page. |
| 70 virtual void OnLogMostVisitedNavigation(int position, | 71 virtual void OnLogMostVisitedNavigation(int position, |
| 71 const base::string16& provider) = 0; | 72 const base::string16& provider) = 0; |
| 72 | 73 |
| 73 // Called when the page wants to paste the |text| (or the clipboard contents | 74 // Called when the page wants to paste the |text| (or the clipboard contents |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 void OnVoiceSearchSupportDetermined(int page_id, | 200 void OnVoiceSearchSupportDetermined(int page_id, |
| 200 bool supports_voice_search) const; | 201 bool supports_voice_search) const; |
| 201 void OnFocusOmnibox(int page_id, OmniboxFocusState state) const; | 202 void OnFocusOmnibox(int page_id, OmniboxFocusState state) const; |
| 202 void OnSearchBoxNavigate(int page_id, | 203 void OnSearchBoxNavigate(int page_id, |
| 203 const GURL& url, | 204 const GURL& url, |
| 204 WindowOpenDisposition disposition, | 205 WindowOpenDisposition disposition, |
| 205 bool is_most_visited_item_url) const; | 206 bool is_most_visited_item_url) const; |
| 206 void OnDeleteMostVisitedItem(int page_seq_no, const GURL& url) const; | 207 void OnDeleteMostVisitedItem(int page_seq_no, const GURL& url) const; |
| 207 void OnUndoMostVisitedDeletion(int page_seq_no, const GURL& url) const; | 208 void OnUndoMostVisitedDeletion(int page_seq_no, const GURL& url) const; |
| 208 void OnUndoAllMostVisitedDeletions(int page_seq_no) const; | 209 void OnUndoAllMostVisitedDeletions(int page_seq_no) const; |
| 209 void OnLogEvent(int page_seq_no, NTPLoggingEventType event) const; | 210 void OnLogEvent(int page_seq_no, NTPLoggingEventType event, int64 time) const; |
| 210 void OnLogMostVisitedImpression(int page_seq_no, | 211 void OnLogMostVisitedImpression(int page_seq_no, |
| 211 int position, | 212 int position, |
| 212 const base::string16& provider) const; | 213 const base::string16& provider) const; |
| 213 void OnLogMostVisitedNavigation(int page_seq_no, | 214 void OnLogMostVisitedNavigation(int page_seq_no, |
| 214 int position, | 215 int position, |
| 215 const base::string16& provider) const; | 216 const base::string16& provider) const; |
| 216 void OnPasteAndOpenDropDown(int page_seq_no, | 217 void OnPasteAndOpenDropDown(int page_seq_no, |
| 217 const base::string16& text) const; | 218 const base::string16& text) const; |
| 218 void OnChromeIdentityCheck(int page_seq_no, | 219 void OnChromeIdentityCheck(int page_seq_no, |
| 219 const base::string16& identity) const; | 220 const base::string16& identity) const; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 238 // SearchIPCRouter to ensure that delayed IPC replies are ignored. | 239 // SearchIPCRouter to ensure that delayed IPC replies are ignored. |
| 239 int commit_counter_; | 240 int commit_counter_; |
| 240 | 241 |
| 241 // Set to true, when the tab corresponding to |this| instance is active. | 242 // Set to true, when the tab corresponding to |this| instance is active. |
| 242 bool is_active_tab_; | 243 bool is_active_tab_; |
| 243 | 244 |
| 244 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter); | 245 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter); |
| 245 }; | 246 }; |
| 246 | 247 |
| 247 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ | 248 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ |
| OLD | NEW |