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

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

Issue 2852693002: Remove DetermineIfPageSupportsInstant and all its plumbing (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « chrome/renderer/searchbox/searchbox.h ('k') | chrome/renderer/searchbox/searchbox_extension.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/renderer/searchbox/searchbox.h" 5 #include "chrome/renderer/searchbox/searchbox.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 void SearchBox::SetPageSequenceNumber(int page_seq_no) { 350 void SearchBox::SetPageSequenceNumber(int page_seq_no) {
351 page_seq_no_ = page_seq_no; 351 page_seq_no_ = page_seq_no;
352 } 352 }
353 353
354 void SearchBox::ChromeIdentityCheckResult(const base::string16& identity, 354 void SearchBox::ChromeIdentityCheckResult(const base::string16& identity,
355 bool identity_match) { 355 bool identity_match) {
356 extensions_v8::SearchBoxExtension::DispatchChromeIdentityCheckResult( 356 extensions_v8::SearchBoxExtension::DispatchChromeIdentityCheckResult(
357 render_frame()->GetWebFrame(), identity, identity_match); 357 render_frame()->GetWebFrame(), identity, identity_match);
358 } 358 }
359 359
360 void SearchBox::DetermineIfPageSupportsInstant() {
361 bool result = extensions_v8::SearchBoxExtension::PageSupportsInstant(
362 render_frame()->GetWebFrame());
363 DVLOG(1) << render_frame() << " PageSupportsInstant: " << result;
364 instant_service_->InstantSupportDetermined(page_seq_no_, result);
365 }
366
367 void SearchBox::FocusChanged(OmniboxFocusState new_focus_state, 360 void SearchBox::FocusChanged(OmniboxFocusState new_focus_state,
368 OmniboxFocusChangeReason reason) { 361 OmniboxFocusChangeReason reason) {
369 bool key_capture_enabled = new_focus_state == OMNIBOX_FOCUS_INVISIBLE; 362 bool key_capture_enabled = new_focus_state == OMNIBOX_FOCUS_INVISIBLE;
370 if (key_capture_enabled != is_key_capture_enabled_) { 363 if (key_capture_enabled != is_key_capture_enabled_) {
371 // Tell the page if the key capture mode changed unless the focus state 364 // Tell the page if the key capture mode changed unless the focus state
372 // changed because of TYPING. This is because in that case, the browser 365 // changed because of TYPING. This is because in that case, the browser
373 // hasn't really stopped capturing key strokes. 366 // hasn't really stopped capturing key strokes.
374 // 367 //
375 // (More practically, if we don't do this check, the page would receive 368 // (More practically, if we don't do this check, the page would receive
376 // onkeycapturechange before the corresponding onchange, and the page would 369 // onkeycapturechange before the corresponding onchange, and the page would
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 embedded_search_request_params_ = EmbeddedSearchRequestParams(); 460 embedded_search_request_params_ = EmbeddedSearchRequestParams();
468 suggestion_ = InstantSuggestion(); 461 suggestion_ = InstantSuggestion();
469 is_focused_ = false; 462 is_focused_ = false;
470 is_key_capture_enabled_ = false; 463 is_key_capture_enabled_ = false;
471 theme_info_ = ThemeBackgroundInfo(); 464 theme_info_ = ThemeBackgroundInfo();
472 } 465 }
473 466
474 void SearchBox::OnDestruct() { 467 void SearchBox::OnDestruct() {
475 delete this; 468 delete this;
476 } 469 }
OLDNEW
« no previous file with comments | « chrome/renderer/searchbox/searchbox.h ('k') | chrome/renderer/searchbox/searchbox_extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698