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

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

Issue 16413002: Moved theme related state from BrowserInstantController to InstantService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 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
« no previous file with comments | « chrome/common/instant_types.cc ('k') | chrome/test/data/instant_extended.html » ('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 <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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 } 446 }
447 } 447 }
448 } 448 }
449 } 449 }
450 450
451 void SearchBox::OnSetDisplayInstantResults(bool display_instant_results) { 451 void SearchBox::OnSetDisplayInstantResults(bool display_instant_results) {
452 display_instant_results_ = display_instant_results; 452 display_instant_results_ = display_instant_results;
453 } 453 }
454 454
455 void SearchBox::OnThemeChanged(const ThemeBackgroundInfo& theme_info) { 455 void SearchBox::OnThemeChanged(const ThemeBackgroundInfo& theme_info) {
456 // Do not send duplicate notifications.
457 if (theme_info_ == theme_info)
458 return;
459
456 theme_info_ = theme_info; 460 theme_info_ = theme_info;
457 if (render_view()->GetWebView() && render_view()->GetWebView()->mainFrame()) { 461 if (render_view()->GetWebView() && render_view()->GetWebView()->mainFrame()) {
458 extensions_v8::SearchBoxExtension::DispatchThemeChange( 462 extensions_v8::SearchBoxExtension::DispatchThemeChange(
459 render_view()->GetWebView()->mainFrame()); 463 render_view()->GetWebView()->mainFrame());
460 } 464 }
461 } 465 }
462 466
463 void SearchBox::OnFontInformationReceived(const string16& omnibox_font, 467 void SearchBox::OnFontInformationReceived(const string16& omnibox_font,
464 size_t omnibox_font_size) { 468 size_t omnibox_font_size) {
465 omnibox_font_ = omnibox_font; 469 omnibox_font_ = omnibox_font;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 InstantMostVisitedItem item; 529 InstantMostVisitedItem item;
526 return GetMostVisitedItemWithID(item_id, &item) ? item.url : GURL(); 530 return GetMostVisitedItemWithID(item_id, &item) ? item.url : GURL();
527 } 531 }
528 532
529 void SearchBox::OnToggleVoiceSearch() { 533 void SearchBox::OnToggleVoiceSearch() {
530 if (render_view()->GetWebView() && render_view()->GetWebView()->mainFrame()) { 534 if (render_view()->GetWebView() && render_view()->GetWebView()->mainFrame()) {
531 extensions_v8::SearchBoxExtension::DispatchToggleVoiceSearch( 535 extensions_v8::SearchBoxExtension::DispatchToggleVoiceSearch(
532 render_view()->GetWebView()->mainFrame()); 536 render_view()->GetWebView()->mainFrame());
533 } 537 }
534 } 538 }
OLDNEW
« no previous file with comments | « chrome/common/instant_types.cc ('k') | chrome/test/data/instant_extended.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698