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

Side by Side Diff: chrome/renderer/searchbox/searchbox.cc

Issue 178253008: Redoing Issue 36073011: Allowing file:/// in Instant Extended's Most Visited links. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused consts. Created 6 years, 9 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/renderer/searchbox/searchbox.h" 5 #include "chrome/renderer/searchbox/searchbox.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 155
156 SearchBox::~SearchBox() { 156 SearchBox::~SearchBox() {
157 } 157 }
158 158
159 void SearchBox::LogEvent(NTPLoggingEventType event) { 159 void SearchBox::LogEvent(NTPLoggingEventType event) {
160 render_view()->Send(new ChromeViewHostMsg_LogEvent( 160 render_view()->Send(new ChromeViewHostMsg_LogEvent(
161 render_view()->GetRoutingID(), render_view()->GetPageId(), event)); 161 render_view()->GetRoutingID(), render_view()->GetPageId(), event));
162 } 162 }
163 163
164 void SearchBox::LogImpression(int position, const base::string16& provider) { 164 void SearchBox::LogMostVisitedImpression(int position,
165 render_view()->Send(new ChromeViewHostMsg_LogImpression( 165 const base::string16& provider) {
166 render_view()->Send(new ChromeViewHostMsg_LogMostVisitedImpression(
166 render_view()->GetRoutingID(), render_view()->GetPageId(), position, 167 render_view()->GetRoutingID(), render_view()->GetPageId(), position,
167 provider)); 168 provider));
168 } 169 }
170
171 void SearchBox::LogMostVisitedNavigation(int position,
172 const base::string16& provider) {
173 render_view()->Send(new ChromeViewHostMsg_LogMostVisitedNavigation(
174 render_view()->GetRoutingID(), render_view()->GetPageId(), position,
175 provider));
176 }
169 177
170 void SearchBox::CheckIsUserSignedInToChromeAs(const base::string16& identity) { 178 void SearchBox::CheckIsUserSignedInToChromeAs(const base::string16& identity) {
171 render_view()->Send(new ChromeViewHostMsg_ChromeIdentityCheck( 179 render_view()->Send(new ChromeViewHostMsg_ChromeIdentityCheck(
172 render_view()->GetRoutingID(), render_view()->GetPageId(), identity)); 180 render_view()->GetRoutingID(), render_view()->GetPageId(), identity));
173 } 181 }
174 182
175 void SearchBox::DeleteMostVisitedItem( 183 void SearchBox::DeleteMostVisitedItem(
176 InstantRestrictedID most_visited_item_id) { 184 InstantRestrictedID most_visited_item_id) {
177 render_view()->Send(new ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem( 185 render_view()->Send(new ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem(
178 render_view()->GetRoutingID(), render_view()->GetPageId(), 186 render_view()->GetRoutingID(), render_view()->GetPageId(),
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 } 461 }
454 462
455 void SearchBox::Reset() { 463 void SearchBox::Reset() {
456 query_.clear(); 464 query_.clear();
457 suggestion_ = InstantSuggestion(); 465 suggestion_ = InstantSuggestion();
458 start_margin_ = 0; 466 start_margin_ = 0;
459 is_focused_ = false; 467 is_focused_ = false;
460 is_key_capture_enabled_ = false; 468 is_key_capture_enabled_ = false;
461 theme_info_ = ThemeBackgroundInfo(); 469 theme_info_ = ThemeBackgroundInfo();
462 } 470 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698