| 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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/time/time.h" |
| 12 #include "chrome/common/instant_types.h" | 13 #include "chrome/common/instant_types.h" |
| 13 #include "chrome/common/ntp_logging_events.h" | 14 #include "chrome/common/ntp_logging_events.h" |
| 14 #include "chrome/common/omnibox_focus_state.h" | 15 #include "chrome/common/omnibox_focus_state.h" |
| 15 #include "content/public/browser/web_contents_observer.h" | 16 #include "content/public/browser/web_contents_observer.h" |
| 16 #include "ui/base/window_open_disposition.h" | 17 #include "ui/base/window_open_disposition.h" |
| 17 | 18 |
| 18 class GURL; | 19 class GURL; |
| 19 | 20 |
| 20 namespace content { | 21 namespace content { |
| 21 class WebContents; | 22 class WebContents; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 52 | 53 |
| 53 // Called when the SearchBox wants to delete a Most Visited item. | 54 // Called when the SearchBox wants to delete a Most Visited item. |
| 54 virtual void OnDeleteMostVisitedItem(const GURL& url) = 0; | 55 virtual void OnDeleteMostVisitedItem(const GURL& url) = 0; |
| 55 | 56 |
| 56 // Called when the SearchBox wants to undo a Most Visited deletion. | 57 // Called when the SearchBox wants to undo a Most Visited deletion. |
| 57 virtual void OnUndoMostVisitedDeletion(const GURL& url) = 0; | 58 virtual void OnUndoMostVisitedDeletion(const GURL& url) = 0; |
| 58 | 59 |
| 59 // Called when the SearchBox wants to undo all Most Visited deletions. | 60 // Called when the SearchBox wants to undo all Most Visited deletions. |
| 60 virtual void OnUndoAllMostVisitedDeletions() = 0; | 61 virtual void OnUndoAllMostVisitedDeletions() = 0; |
| 61 | 62 |
| 62 // Called to signal that an event has occurred on the New Tab Page. | 63 // Called to signal that an event has occurred on the New Tab Page at a |
| 63 virtual void OnLogEvent(NTPLoggingEventType event) = 0; | 64 // particular time since navigation start. |
| 65 virtual void OnLogEvent(NTPLoggingEventType event, |
| 66 base::TimeDelta time) = 0; |
| 64 | 67 |
| 65 // Called to log an impression from a given provider on the New Tab Page. | 68 // Called to log an impression from a given provider on the New Tab Page. |
| 66 virtual void OnLogMostVisitedImpression(int position, | 69 virtual void OnLogMostVisitedImpression(int position, |
| 67 const base::string16& provider) = 0; | 70 const base::string16& provider) = 0; |
| 68 | 71 |
| 69 // Called to log a navigation from a given provider on the New Tab Page. | 72 // Called to log a navigation from a given provider on the New Tab Page. |
| 70 virtual void OnLogMostVisitedNavigation(int position, | 73 virtual void OnLogMostVisitedNavigation(int position, |
| 71 const base::string16& provider) = 0; | 74 const base::string16& provider) = 0; |
| 72 | 75 |
| 73 // Called when the page wants to paste the |text| (or the clipboard contents | 76 // 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, | 202 void OnVoiceSearchSupportDetermined(int page_id, |
| 200 bool supports_voice_search) const; | 203 bool supports_voice_search) const; |
| 201 void OnFocusOmnibox(int page_id, OmniboxFocusState state) const; | 204 void OnFocusOmnibox(int page_id, OmniboxFocusState state) const; |
| 202 void OnSearchBoxNavigate(int page_id, | 205 void OnSearchBoxNavigate(int page_id, |
| 203 const GURL& url, | 206 const GURL& url, |
| 204 WindowOpenDisposition disposition, | 207 WindowOpenDisposition disposition, |
| 205 bool is_most_visited_item_url) const; | 208 bool is_most_visited_item_url) const; |
| 206 void OnDeleteMostVisitedItem(int page_seq_no, const GURL& url) const; | 209 void OnDeleteMostVisitedItem(int page_seq_no, const GURL& url) const; |
| 207 void OnUndoMostVisitedDeletion(int page_seq_no, const GURL& url) const; | 210 void OnUndoMostVisitedDeletion(int page_seq_no, const GURL& url) const; |
| 208 void OnUndoAllMostVisitedDeletions(int page_seq_no) const; | 211 void OnUndoAllMostVisitedDeletions(int page_seq_no) const; |
| 209 void OnLogEvent(int page_seq_no, NTPLoggingEventType event) const; | 212 void OnLogEvent(int page_seq_no, |
| 213 NTPLoggingEventType event, |
| 214 base::TimeDelta time) const; |
| 210 void OnLogMostVisitedImpression(int page_seq_no, | 215 void OnLogMostVisitedImpression(int page_seq_no, |
| 211 int position, | 216 int position, |
| 212 const base::string16& provider) const; | 217 const base::string16& provider) const; |
| 213 void OnLogMostVisitedNavigation(int page_seq_no, | 218 void OnLogMostVisitedNavigation(int page_seq_no, |
| 214 int position, | 219 int position, |
| 215 const base::string16& provider) const; | 220 const base::string16& provider) const; |
| 216 void OnPasteAndOpenDropDown(int page_seq_no, | 221 void OnPasteAndOpenDropDown(int page_seq_no, |
| 217 const base::string16& text) const; | 222 const base::string16& text) const; |
| 218 void OnChromeIdentityCheck(int page_seq_no, | 223 void OnChromeIdentityCheck(int page_seq_no, |
| 219 const base::string16& identity) const; | 224 const base::string16& identity) const; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 238 // SearchIPCRouter to ensure that delayed IPC replies are ignored. | 243 // SearchIPCRouter to ensure that delayed IPC replies are ignored. |
| 239 int commit_counter_; | 244 int commit_counter_; |
| 240 | 245 |
| 241 // Set to true, when the tab corresponding to |this| instance is active. | 246 // Set to true, when the tab corresponding to |this| instance is active. |
| 242 bool is_active_tab_; | 247 bool is_active_tab_; |
| 243 | 248 |
| 244 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter); | 249 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter); |
| 245 }; | 250 }; |
| 246 | 251 |
| 247 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ | 252 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ |
| OLD | NEW |