| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include "chrome/renderer/searchbox/searchbox.h" | 5 #include "chrome/renderer/searchbox/searchbox.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 uint64_t now = (base::TimeTicks::Now() - base::TimeTicks::UnixEpoch()) | 262 uint64_t now = (base::TimeTicks::Now() - base::TimeTicks::UnixEpoch()) |
| 263 .InMilliseconds(); | 263 .InMilliseconds(); |
| 264 DCHECK(now >= start); | 264 DCHECK(now >= start); |
| 265 delta = base::TimeDelta::FromMilliseconds(now - start); | 265 delta = base::TimeDelta::FromMilliseconds(now - start); |
| 266 } | 266 } |
| 267 render_view()->Send(new ChromeViewHostMsg_LogEvent( | 267 render_view()->Send(new ChromeViewHostMsg_LogEvent( |
| 268 render_view()->GetRoutingID(), page_seq_no_, event, delta)); | 268 render_view()->GetRoutingID(), page_seq_no_, event, delta)); |
| 269 } | 269 } |
| 270 | 270 |
| 271 void SearchBox::LogMostVisitedImpression(int position, | 271 void SearchBox::LogMostVisitedImpression(int position, |
| 272 const base::string16& provider) { | 272 NTPLoggingTileSource tile_source) { |
| 273 render_view()->Send(new ChromeViewHostMsg_LogMostVisitedImpression( | 273 render_view()->Send(new ChromeViewHostMsg_LogMostVisitedImpression( |
| 274 render_view()->GetRoutingID(), page_seq_no_, position, provider)); | 274 render_view()->GetRoutingID(), page_seq_no_, position, tile_source)); |
| 275 } | 275 } |
| 276 | 276 |
| 277 void SearchBox::LogMostVisitedNavigation(int position, | 277 void SearchBox::LogMostVisitedNavigation(int position, |
| 278 const base::string16& provider) { | 278 NTPLoggingTileSource tile_source) { |
| 279 render_view()->Send(new ChromeViewHostMsg_LogMostVisitedNavigation( | 279 render_view()->Send(new ChromeViewHostMsg_LogMostVisitedNavigation( |
| 280 render_view()->GetRoutingID(), page_seq_no_, position, provider)); | 280 render_view()->GetRoutingID(), page_seq_no_, position, tile_source)); |
| 281 } | 281 } |
| 282 | 282 |
| 283 void SearchBox::CheckIsUserSignedInToChromeAs(const base::string16& identity) { | 283 void SearchBox::CheckIsUserSignedInToChromeAs(const base::string16& identity) { |
| 284 render_view()->Send(new ChromeViewHostMsg_ChromeIdentityCheck( | 284 render_view()->Send(new ChromeViewHostMsg_ChromeIdentityCheck( |
| 285 render_view()->GetRoutingID(), page_seq_no_, identity)); | 285 render_view()->GetRoutingID(), page_seq_no_, identity)); |
| 286 } | 286 } |
| 287 | 287 |
| 288 void SearchBox::CheckIsUserSyncingHistory() { | 288 void SearchBox::CheckIsUserSyncingHistory() { |
| 289 render_view()->Send(new ChromeViewHostMsg_HistorySyncCheck( | 289 render_view()->Send(new ChromeViewHostMsg_HistorySyncCheck( |
| 290 render_view()->GetRoutingID(), page_seq_no_)); | 290 render_view()->GetRoutingID(), page_seq_no_)); |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 embedded_search_request_params_ = EmbeddedSearchRequestParams(); | 534 embedded_search_request_params_ = EmbeddedSearchRequestParams(); |
| 535 suggestion_ = InstantSuggestion(); | 535 suggestion_ = InstantSuggestion(); |
| 536 is_focused_ = false; | 536 is_focused_ = false; |
| 537 is_key_capture_enabled_ = false; | 537 is_key_capture_enabled_ = false; |
| 538 theme_info_ = ThemeBackgroundInfo(); | 538 theme_info_ = ThemeBackgroundInfo(); |
| 539 } | 539 } |
| 540 | 540 |
| 541 void SearchBox::OnDestruct() { | 541 void SearchBox::OnDestruct() { |
| 542 delete this; | 542 delete this; |
| 543 } | 543 } |
| OLD | NEW |