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

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

Issue 11413217: Instant API: tell page whether the browser is capturing key strokes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@focus
Patch Set: Fix tests. Created 8 years 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
« no previous file with comments | « chrome/browser/instant/instant_loader.h ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/history/history_tab_helper.h" 9 #include "chrome/browser/history/history_tab_helper.h"
10 #include "chrome/browser/instant/instant_controller.h" 10 #include "chrome/browser/instant/instant_controller.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 266 }
267 267
268 void InstantLoader::SendThemeAreaHeight(int height) { 268 void InstantLoader::SendThemeAreaHeight(int height) {
269 client_.SendThemeAreaHeight(height); 269 client_.SendThemeAreaHeight(height);
270 } 270 }
271 271
272 void InstantLoader::SetDisplayInstantResults(bool display_instant_results) { 272 void InstantLoader::SetDisplayInstantResults(bool display_instant_results) {
273 client_.SetDisplayInstantResults(display_instant_results); 273 client_.SetDisplayInstantResults(display_instant_results);
274 } 274 }
275 275
276 void InstantLoader::KeyCaptureChanged(bool is_key_capture_enabled) {
277 client_.KeyCaptureChanged(is_key_capture_enabled);
278 }
279
276 void InstantLoader::SetSuggestions( 280 void InstantLoader::SetSuggestions(
277 const std::vector<InstantSuggestion>& suggestions) { 281 const std::vector<InstantSuggestion>& suggestions) {
278 InstantSupportDetermined(true); 282 InstantSupportDetermined(true);
279 controller_->SetSuggestions(contents(), suggestions); 283 controller_->SetSuggestions(contents(), suggestions);
280 } 284 }
281 285
282 void InstantLoader::InstantSupportDetermined(bool supports_instant) { 286 void InstantLoader::InstantSupportDetermined(bool supports_instant) {
283 // If we had already determined that the page supports Instant, nothing to do. 287 // If we had already determined that the page supports Instant, nothing to do.
284 if (supports_instant_) 288 if (supports_instant_)
285 return; 289 return;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 content::WebContents* new_contents) { 410 content::WebContents* new_contents) {
407 DCHECK_EQ(old_contents, contents()); 411 DCHECK_EQ(old_contents, contents());
408 CleanupPreviewContents(); 412 CleanupPreviewContents();
409 // We release here without deleting so that the caller still has the 413 // We release here without deleting so that the caller still has the
410 // responsibility for deleting the WebContents. 414 // responsibility for deleting the WebContents.
411 ignore_result(contents_.release()); 415 ignore_result(contents_.release());
412 contents_.reset(new_contents); 416 contents_.reset(new_contents);
413 SetupPreviewContents(); 417 SetupPreviewContents();
414 controller_->SwappedWebContents(); 418 controller_->SwappedWebContents();
415 } 419 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_loader.h ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698