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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 uint64_t start = | 260 uint64_t start = |
261 1000 * (render_frame()->GetWebFrame()->performance().navigationStart()); | 261 1000 * (render_frame()->GetWebFrame()->performance().navigationStart()); |
262 uint64_t now = | 262 uint64_t now = |
263 (base::TimeTicks::Now() - base::TimeTicks::UnixEpoch()).InMilliseconds(); | 263 (base::TimeTicks::Now() - base::TimeTicks::UnixEpoch()).InMilliseconds(); |
264 DCHECK(now >= start); | 264 DCHECK(now >= start); |
265 base::TimeDelta delta = base::TimeDelta::FromMilliseconds(now - start); | 265 base::TimeDelta delta = base::TimeDelta::FromMilliseconds(now - start); |
266 instant_service_->LogEvent(page_seq_no_, event, delta); | 266 instant_service_->LogEvent(page_seq_no_, event, delta); |
267 } | 267 } |
268 | 268 |
269 void SearchBox::LogMostVisitedImpression(int position, | 269 void SearchBox::LogMostVisitedImpression(int position, |
270 ntp_tiles::TileSource tile_source) { | 270 ntp_tiles::TileSource tile_source, |
| 271 ntp_tiles::TileVisualType tile_type) { |
271 instant_service_->LogMostVisitedImpression(page_seq_no_, position, | 272 instant_service_->LogMostVisitedImpression(page_seq_no_, position, |
272 tile_source); | 273 tile_source, tile_type); |
273 } | 274 } |
274 | 275 |
275 void SearchBox::LogMostVisitedNavigation(int position, | 276 void SearchBox::LogMostVisitedNavigation(int position, |
276 ntp_tiles::TileSource tile_source) { | 277 ntp_tiles::TileSource tile_source, |
| 278 ntp_tiles::TileVisualType tile_type) { |
277 instant_service_->LogMostVisitedNavigation(page_seq_no_, position, | 279 instant_service_->LogMostVisitedNavigation(page_seq_no_, position, |
278 tile_source); | 280 tile_source, tile_type); |
279 } | 281 } |
280 | 282 |
281 void SearchBox::CheckIsUserSignedInToChromeAs(const base::string16& identity) { | 283 void SearchBox::CheckIsUserSignedInToChromeAs(const base::string16& identity) { |
282 instant_service_->ChromeIdentityCheck(page_seq_no_, identity); | 284 instant_service_->ChromeIdentityCheck(page_seq_no_, identity); |
283 } | 285 } |
284 | 286 |
285 void SearchBox::CheckIsUserSyncingHistory() { | 287 void SearchBox::CheckIsUserSyncingHistory() { |
286 instant_service_->HistorySyncCheck(page_seq_no_); | 288 instant_service_->HistorySyncCheck(page_seq_no_); |
287 } | 289 } |
288 | 290 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 embedded_search_request_params_ = EmbeddedSearchRequestParams(); | 467 embedded_search_request_params_ = EmbeddedSearchRequestParams(); |
466 suggestion_ = InstantSuggestion(); | 468 suggestion_ = InstantSuggestion(); |
467 is_focused_ = false; | 469 is_focused_ = false; |
468 is_key_capture_enabled_ = false; | 470 is_key_capture_enabled_ = false; |
469 theme_info_ = ThemeBackgroundInfo(); | 471 theme_info_ = ThemeBackgroundInfo(); |
470 } | 472 } |
471 | 473 |
472 void SearchBox::OnDestruct() { | 474 void SearchBox::OnDestruct() { |
473 delete this; | 475 delete this; |
474 } | 476 } |
OLD | NEW |