Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: chrome/browser/ui/search/search_ipc_router.h

Issue 2117373002: Cleanup: Change LogMostVisitedImpression|Navigation APIs to take an enum (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ntp_uma_cleanup
Patch Set: rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 // Called when the SearchBox wants to undo all Most Visited deletions. 50 // Called when the SearchBox wants to undo all Most Visited deletions.
51 virtual void OnUndoAllMostVisitedDeletions() = 0; 51 virtual void OnUndoAllMostVisitedDeletions() = 0;
52 52
53 // Called to signal that an event has occurred on the New Tab Page at a 53 // Called to signal that an event has occurred on the New Tab Page at a
54 // particular time since navigation start. 54 // particular time since navigation start.
55 virtual void OnLogEvent(NTPLoggingEventType event, 55 virtual void OnLogEvent(NTPLoggingEventType event,
56 base::TimeDelta time) = 0; 56 base::TimeDelta time) = 0;
57 57
58 // Called to log an impression from a given provider on the New Tab Page. 58 // Called to log an impression from a given provider on the New Tab Page.
59 virtual void OnLogMostVisitedImpression(int position, 59 virtual void OnLogMostVisitedImpression(
60 const base::string16& provider) = 0; 60 int position,
61 NTPLoggingTileSource tile_source) = 0;
61 62
62 // Called to log a navigation from a given provider on the New Tab Page. 63 // Called to log a navigation from a given provider on the New Tab Page.
63 virtual void OnLogMostVisitedNavigation(int position, 64 virtual void OnLogMostVisitedNavigation(
64 const base::string16& provider) = 0; 65 int position,
66 NTPLoggingTileSource tile_source) = 0;
65 67
66 // Called when the page wants to paste the |text| (or the clipboard contents 68 // Called when the page wants to paste the |text| (or the clipboard contents
67 // if the |text| is empty) into the omnibox. 69 // if the |text| is empty) into the omnibox.
68 virtual void PasteIntoOmnibox(const base::string16& text) = 0; 70 virtual void PasteIntoOmnibox(const base::string16& text) = 0;
69 71
70 // Called when the SearchBox wants to verify the signed-in Chrome identity 72 // Called when the SearchBox wants to verify the signed-in Chrome identity
71 // against the provided |identity|. Will make a round-trip to the browser 73 // against the provided |identity|. Will make a round-trip to the browser
72 // and eventually return the result through SendChromeIdentityCheckResult. 74 // and eventually return the result through SendChromeIdentityCheckResult.
73 // Calls SendChromeIdentityCheckResult with true if the identity matches. 75 // Calls SendChromeIdentityCheckResult with true if the identity matches.
74 virtual void OnChromeIdentityCheck(const base::string16& identity) = 0; 76 virtual void OnChromeIdentityCheck(const base::string16& identity) = 0;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 void OnInstantSupportDetermined(int page_seq_no, bool supports_instant) const; 183 void OnInstantSupportDetermined(int page_seq_no, bool supports_instant) const;
182 void OnFocusOmnibox(int page_id, OmniboxFocusState state) const; 184 void OnFocusOmnibox(int page_id, OmniboxFocusState state) const;
183 void OnDeleteMostVisitedItem(int page_seq_no, const GURL& url) const; 185 void OnDeleteMostVisitedItem(int page_seq_no, const GURL& url) const;
184 void OnUndoMostVisitedDeletion(int page_seq_no, const GURL& url) const; 186 void OnUndoMostVisitedDeletion(int page_seq_no, const GURL& url) const;
185 void OnUndoAllMostVisitedDeletions(int page_seq_no) const; 187 void OnUndoAllMostVisitedDeletions(int page_seq_no) const;
186 void OnLogEvent(int page_seq_no, 188 void OnLogEvent(int page_seq_no,
187 NTPLoggingEventType event, 189 NTPLoggingEventType event,
188 base::TimeDelta time) const; 190 base::TimeDelta time) const;
189 void OnLogMostVisitedImpression(int page_seq_no, 191 void OnLogMostVisitedImpression(int page_seq_no,
190 int position, 192 int position,
191 const base::string16& provider) const; 193 NTPLoggingTileSource tile_source) const;
192 void OnLogMostVisitedNavigation(int page_seq_no, 194 void OnLogMostVisitedNavigation(int page_seq_no,
193 int position, 195 int position,
194 const base::string16& provider) const; 196 NTPLoggingTileSource tile_source) const;
195 void OnPasteAndOpenDropDown(int page_seq_no, 197 void OnPasteAndOpenDropDown(int page_seq_no,
196 const base::string16& text) const; 198 const base::string16& text) const;
197 void OnChromeIdentityCheck(int page_seq_no, 199 void OnChromeIdentityCheck(int page_seq_no,
198 const base::string16& identity) const; 200 const base::string16& identity) const;
199 void OnHistorySyncCheck(int page_seq_no) const; 201 void OnHistorySyncCheck(int page_seq_no) const;
200 202
201 // Used by unit tests to set a fake delegate. 203 // Used by unit tests to set a fake delegate.
202 void set_delegate_for_testing(Delegate* delegate); 204 void set_delegate_for_testing(Delegate* delegate);
203 205
204 // Used by unit tests. 206 // Used by unit tests.
(...skipping 12 matching lines...) Expand all
217 // SearchIPCRouter to ensure that delayed IPC replies are ignored. 219 // SearchIPCRouter to ensure that delayed IPC replies are ignored.
218 int commit_counter_; 220 int commit_counter_;
219 221
220 // Set to true, when the tab corresponding to |this| instance is active. 222 // Set to true, when the tab corresponding to |this| instance is active.
221 bool is_active_tab_; 223 bool is_active_tab_;
222 224
223 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter); 225 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter);
224 }; 226 };
225 227
226 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ 228 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/local_ntp/most_visited_util.js ('k') | chrome/browser/ui/search/search_ipc_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698