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

Side by Side Diff: chrome/browser/instant/instant_loader.cc

Issue 12047107: Change the SearchBox API from using the start/end margins of the location bar to using the start ma… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added test Created 7 years, 10 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/instant/instant_loader.h" 5 #include "chrome/browser/instant/instant_loader.h"
6 6
7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 7 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" 8 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
9 #include "chrome/browser/favicon/favicon_tab_helper.h" 9 #include "chrome/browser/favicon/favicon_tab_helper.h"
10 #include "chrome/browser/history/history_tab_helper.h" 10 #include "chrome/browser/history/history_tab_helper.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 } 237 }
238 238
239 void InstantLoader::Cancel(const string16& text) { 239 void InstantLoader::Cancel(const string16& text) {
240 client_.Cancel(text); 240 client_.Cancel(text);
241 } 241 }
242 242
243 void InstantLoader::SetPopupBounds(const gfx::Rect& bounds) { 243 void InstantLoader::SetPopupBounds(const gfx::Rect& bounds) {
244 client_.SetPopupBounds(bounds); 244 client_.SetPopupBounds(bounds);
245 } 245 }
246 246
247 void InstantLoader::SetMarginSize(int start, int end) { 247 void InstantLoader::SetStartMarginAndWidth(int margin, int width) {
248 client_.SetMarginSize(start, end); 248 client_.SetStartMarginAndWidth(margin, width);
249 } 249 }
250 250
251 void InstantLoader::InitializeFonts() { 251 void InstantLoader::InitializeFonts() {
252 client_.InitializeFonts(); 252 client_.InitializeFonts();
253 } 253 }
254 254
255 void InstantLoader::SendAutocompleteResults( 255 void InstantLoader::SendAutocompleteResults(
256 const std::vector<InstantAutocompleteResult>& results) { 256 const std::vector<InstantAutocompleteResult>& results) {
257 client_.SendAutocompleteResults(results); 257 client_.SendAutocompleteResults(results);
258 } 258 }
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 content::WebContents* new_contents) { 419 content::WebContents* new_contents) {
420 DCHECK_EQ(old_contents, contents()); 420 DCHECK_EQ(old_contents, contents());
421 CleanupPreviewContents(); 421 CleanupPreviewContents();
422 // We release here without deleting so that the caller still has the 422 // We release here without deleting so that the caller still has the
423 // responsibility for deleting the WebContents. 423 // responsibility for deleting the WebContents.
424 ignore_result(contents_.release()); 424 ignore_result(contents_.release());
425 contents_.reset(new_contents); 425 contents_.reset(new_contents);
426 SetupPreviewContents(); 426 SetupPreviewContents();
427 controller_->SwappedWebContents(); 427 controller_->SwappedWebContents();
428 } 428 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698