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

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

Issue 259393006: Remove WebUI NTP on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 <set> 7 #include <set>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 if (instant_service_) 461 if (instant_service_)
462 instant_service_->UndoMostVisitedDeletion(url); 462 instant_service_->UndoMostVisitedDeletion(url);
463 } 463 }
464 464
465 void SearchTabHelper::OnUndoAllMostVisitedDeletions() { 465 void SearchTabHelper::OnUndoAllMostVisitedDeletions() {
466 if (instant_service_) 466 if (instant_service_)
467 instant_service_->UndoAllMostVisitedDeletions(); 467 instant_service_->UndoAllMostVisitedDeletions();
468 } 468 }
469 469
470 void SearchTabHelper::OnLogEvent(NTPLoggingEventType event) { 470 void SearchTabHelper::OnLogEvent(NTPLoggingEventType event) {
471 // TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef.
472 #if !defined(OS_ANDROID)
471 NTPUserDataLogger::GetOrCreateFromWebContents( 473 NTPUserDataLogger::GetOrCreateFromWebContents(
472 web_contents())->LogEvent(event); 474 web_contents())->LogEvent(event);
475 #endif
473 } 476 }
474 477
475 void SearchTabHelper::OnLogMostVisitedImpression( 478 void SearchTabHelper::OnLogMostVisitedImpression(
476 int position, const base::string16& provider) { 479 int position, const base::string16& provider) {
480 // TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef.
481 #if !defined(OS_ANDROID)
477 NTPUserDataLogger::GetOrCreateFromWebContents( 482 NTPUserDataLogger::GetOrCreateFromWebContents(
478 web_contents())->LogMostVisitedImpression(position, provider); 483 web_contents())->LogMostVisitedImpression(position, provider);
484 #endif
479 } 485 }
480 486
481 void SearchTabHelper::OnLogMostVisitedNavigation( 487 void SearchTabHelper::OnLogMostVisitedNavigation(
482 int position, const base::string16& provider) { 488 int position, const base::string16& provider) {
489 // TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef.
490 #if !defined(OS_ANDROID)
483 NTPUserDataLogger::GetOrCreateFromWebContents( 491 NTPUserDataLogger::GetOrCreateFromWebContents(
484 web_contents())->LogMostVisitedNavigation(position, provider); 492 web_contents())->LogMostVisitedNavigation(position, provider);
493 #endif
485 } 494 }
486 495
487 void SearchTabHelper::PasteIntoOmnibox(const base::string16& text) { 496 void SearchTabHelper::PasteIntoOmnibox(const base::string16& text) {
488 // TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef. 497 // TODO(kmadhusu): Move platform specific code from here and get rid of #ifdef.
489 #if !defined(OS_ANDROID) 498 #if !defined(OS_ANDROID)
490 OmniboxView* omnibox = GetOmniboxView(); 499 OmniboxView* omnibox = GetOmniboxView();
491 if (!omnibox) 500 if (!omnibox)
492 return; 501 return;
493 // The first case is for right click to paste, where the text is retrieved 502 // The first case is for right click to paste, where the text is retrieved
494 // from the clipboard already sanitized. The second case is needed to handle 503 // from the clipboard already sanitized. The second case is needed to handle
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 585
577 bool SearchTabHelper::IsInputInProgress() const { 586 bool SearchTabHelper::IsInputInProgress() const {
578 OmniboxView* omnibox = GetOmniboxView(); 587 OmniboxView* omnibox = GetOmniboxView();
579 return !model_.mode().is_ntp() && omnibox && 588 return !model_.mode().is_ntp() && omnibox &&
580 omnibox->model()->focus_state() == OMNIBOX_FOCUS_VISIBLE; 589 omnibox->model()->focus_state() == OMNIBOX_FOCUS_VISIBLE;
581 } 590 }
582 591
583 OmniboxView* SearchTabHelper::GetOmniboxView() const { 592 OmniboxView* SearchTabHelper::GetOmniboxView() const {
584 return delegate_ ? delegate_->GetOmniboxView() : NULL; 593 return delegate_ ? delegate_->GetOmniboxView() : NULL;
585 } 594 }
OLDNEW
« no previous file with comments | « chrome/browser/search/instant_service.cc ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698