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

Side by Side Diff: chrome/browser/ui/search/search_tab_helper.cc

Issue 2790463003: ntp_tiles: Cleanup enum names (Closed)
Patch Set: add back histogram enums 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 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/browser/ui/search/search_tab_helper.h" 5 #include "chrome/browser/ui/search/search_tab_helper.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 base::TimeDelta time) { 398 base::TimeDelta time) {
399 // TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef. 399 // TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef.
400 #if !defined(OS_ANDROID) 400 #if !defined(OS_ANDROID)
401 NTPUserDataLogger::GetOrCreateFromWebContents(web_contents()) 401 NTPUserDataLogger::GetOrCreateFromWebContents(web_contents())
402 ->LogEvent(event, time); 402 ->LogEvent(event, time);
403 #endif 403 #endif
404 } 404 }
405 405
406 void SearchTabHelper::OnLogMostVisitedImpression( 406 void SearchTabHelper::OnLogMostVisitedImpression(
407 int position, 407 int position,
408 ntp_tiles::NTPTileSource tile_source) { 408 ntp_tiles::TileSource tile_source) {
409 // TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef. 409 // TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef.
410 #if !defined(OS_ANDROID) 410 #if !defined(OS_ANDROID)
411 NTPUserDataLogger::GetOrCreateFromWebContents( 411 NTPUserDataLogger::GetOrCreateFromWebContents(
412 web_contents())->LogMostVisitedImpression(position, tile_source); 412 web_contents())->LogMostVisitedImpression(position, tile_source);
413 #endif 413 #endif
414 } 414 }
415 415
416 void SearchTabHelper::OnLogMostVisitedNavigation( 416 void SearchTabHelper::OnLogMostVisitedNavigation(
417 int position, 417 int position,
418 ntp_tiles::NTPTileSource tile_source) { 418 ntp_tiles::TileSource tile_source) {
419 // TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef. 419 // TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef.
420 #if !defined(OS_ANDROID) 420 #if !defined(OS_ANDROID)
421 NTPUserDataLogger::GetOrCreateFromWebContents( 421 NTPUserDataLogger::GetOrCreateFromWebContents(
422 web_contents())->LogMostVisitedNavigation(position, tile_source); 422 web_contents())->LogMostVisitedNavigation(position, tile_source);
423 #endif 423 #endif
424 } 424 }
425 425
426 void SearchTabHelper::PasteIntoOmnibox(const base::string16& text) { 426 void SearchTabHelper::PasteIntoOmnibox(const base::string16& text) {
427 // TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef. 427 // TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef.
428 #if !defined(OS_ANDROID) 428 #if !defined(OS_ANDROID)
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 return Profile::FromBrowserContext(web_contents_->GetBrowserContext()); 533 return Profile::FromBrowserContext(web_contents_->GetBrowserContext());
534 } 534 }
535 535
536 bool SearchTabHelper::IsInputInProgress() const { 536 bool SearchTabHelper::IsInputInProgress() const {
537 if (model_.mode().is_ntp()) 537 if (model_.mode().is_ntp())
538 return false; 538 return false;
539 const OmniboxView* omnibox_view = GetOmniboxView(); 539 const OmniboxView* omnibox_view = GetOmniboxView();
540 return omnibox_view && 540 return omnibox_view &&
541 omnibox_view->model()->focus_state() == OMNIBOX_FOCUS_VISIBLE; 541 omnibox_view->model()->focus_state() == OMNIBOX_FOCUS_VISIBLE;
542 } 542 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper.h ('k') | chrome/browser/ui/search/search_tab_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698