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

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

Issue 2796643002: NTP: Record TileType metrics also on desktop (Closed)
Patch Set: review Created 3 years, 8 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
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "chrome/common/instant.mojom.h" 14 #include "chrome/common/instant.mojom.h"
15 #include "chrome/common/search/instant_types.h" 15 #include "chrome/common/search/instant_types.h"
16 #include "chrome/common/search/ntp_logging_events.h" 16 #include "chrome/common/search/ntp_logging_events.h"
17 #include "components/ntp_tiles/tile_source.h" 17 #include "components/ntp_tiles/tile_source.h"
18 #include "components/ntp_tiles/tile_visual_type.h"
18 #include "components/omnibox/common/omnibox_focus_state.h" 19 #include "components/omnibox/common/omnibox_focus_state.h"
19 #include "content/public/browser/web_contents_binding_set.h" 20 #include "content/public/browser/web_contents_binding_set.h"
20 #include "content/public/browser/web_contents_observer.h" 21 #include "content/public/browser/web_contents_observer.h"
21 #include "ui/base/window_open_disposition.h" 22 #include "ui/base/window_open_disposition.h"
22 23
23 class GURL; 24 class GURL;
24 25
25 namespace content { 26 namespace content {
26 class WebContents; 27 class WebContents;
27 } 28 }
(...skipping 27 matching lines...) Expand all
55 virtual void OnUndoAllMostVisitedDeletions() = 0; 56 virtual void OnUndoAllMostVisitedDeletions() = 0;
56 57
57 // Called to signal that an event has occurred on the New Tab Page at a 58 // Called to signal that an event has occurred on the New Tab Page at a
58 // particular time since navigation start. 59 // particular time since navigation start.
59 virtual void OnLogEvent(NTPLoggingEventType event, 60 virtual void OnLogEvent(NTPLoggingEventType event,
60 base::TimeDelta time) = 0; 61 base::TimeDelta time) = 0;
61 62
62 // Called to log an impression from a given provider on the New Tab Page. 63 // Called to log an impression from a given provider on the New Tab Page.
63 virtual void OnLogMostVisitedImpression( 64 virtual void OnLogMostVisitedImpression(
64 int position, 65 int position,
65 ntp_tiles::TileSource tile_source) = 0; 66 ntp_tiles::TileSource tile_source,
67 ntp_tiles::TileVisualType tile_type) = 0;
66 68
67 // Called to log a navigation from a given provider on the New Tab Page. 69 // Called to log a navigation from a given provider on the New Tab Page.
68 virtual void OnLogMostVisitedNavigation( 70 virtual void OnLogMostVisitedNavigation(
69 int position, 71 int position,
70 ntp_tiles::TileSource tile_source) = 0; 72 ntp_tiles::TileSource tile_source,
73 ntp_tiles::TileVisualType tile_type) = 0;
71 74
72 // Called when the page wants to paste the |text| (or the clipboard contents 75 // Called when the page wants to paste the |text| (or the clipboard contents
73 // if the |text| is empty) into the omnibox. 76 // if the |text| is empty) into the omnibox.
74 virtual void PasteIntoOmnibox(const base::string16& text) = 0; 77 virtual void PasteIntoOmnibox(const base::string16& text) = 0;
75 78
76 // Called when the SearchBox wants to verify the signed-in Chrome identity 79 // Called when the SearchBox wants to verify the signed-in Chrome identity
77 // against the provided |identity|. Will make a round-trip to the browser 80 // against the provided |identity|. Will make a round-trip to the browser
78 // and eventually return the result through SendChromeIdentityCheckResult. 81 // and eventually return the result through SendChromeIdentityCheckResult.
79 // Calls SendChromeIdentityCheckResult with true if the identity matches. 82 // Calls SendChromeIdentityCheckResult with true if the identity matches.
80 virtual void OnChromeIdentityCheck(const base::string16& identity) = 0; 83 virtual void OnChromeIdentityCheck(const base::string16& identity) = 0;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 bool supports_instant) override; 179 bool supports_instant) override;
177 void FocusOmnibox(int page_id, OmniboxFocusState state) override; 180 void FocusOmnibox(int page_id, OmniboxFocusState state) override;
178 void DeleteMostVisitedItem(int page_seq_no, const GURL& url) override; 181 void DeleteMostVisitedItem(int page_seq_no, const GURL& url) override;
179 void UndoMostVisitedDeletion(int page_seq_no, const GURL& url) override; 182 void UndoMostVisitedDeletion(int page_seq_no, const GURL& url) override;
180 void UndoAllMostVisitedDeletions(int page_seq_no) override; 183 void UndoAllMostVisitedDeletions(int page_seq_no) override;
181 void LogEvent(int page_seq_no, 184 void LogEvent(int page_seq_no,
182 NTPLoggingEventType event, 185 NTPLoggingEventType event,
183 base::TimeDelta time) override; 186 base::TimeDelta time) override;
184 void LogMostVisitedImpression(int page_seq_no, 187 void LogMostVisitedImpression(int page_seq_no,
185 int position, 188 int position,
186 ntp_tiles::TileSource tile_source) override; 189 ntp_tiles::TileSource tile_source,
190 ntp_tiles::TileVisualType tile_type) override;
187 void LogMostVisitedNavigation(int page_seq_no, 191 void LogMostVisitedNavigation(int page_seq_no,
188 int position, 192 int position,
189 ntp_tiles::TileSource tile_source) override; 193 ntp_tiles::TileSource tile_source,
194 ntp_tiles::TileVisualType tile_type) override;
190 void PasteAndOpenDropdown(int page_seq_no, 195 void PasteAndOpenDropdown(int page_seq_no,
191 const base::string16& text) override; 196 const base::string16& text) override;
192 void ChromeIdentityCheck(int page_seq_no, 197 void ChromeIdentityCheck(int page_seq_no,
193 const base::string16& identity) override; 198 const base::string16& identity) override;
194 void HistorySyncCheck(int page_seq_no) override; 199 void HistorySyncCheck(int page_seq_no) override;
195 200
196 void set_search_box_client_factory_for_testing( 201 void set_search_box_client_factory_for_testing(
197 std::unique_ptr<SearchBoxClientFactory> factory) { 202 std::unique_ptr<SearchBoxClientFactory> factory) {
198 search_box_client_factory_ = std::move(factory); 203 search_box_client_factory_ = std::move(factory);
199 } 204 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // the moment, but this could be extended to a map of connected frames, if 246 // the moment, but this could be extended to a map of connected frames, if
242 // desired. 247 // desired.
243 mojo::AssociatedBinding<chrome::mojom::Instant> binding_; 248 mojo::AssociatedBinding<chrome::mojom::Instant> binding_;
244 249
245 std::unique_ptr<SearchBoxClientFactory> search_box_client_factory_; 250 std::unique_ptr<SearchBoxClientFactory> search_box_client_factory_;
246 251
247 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter); 252 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter);
248 }; 253 };
249 254
250 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ 255 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698