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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/instant_types.cc ('k') | chrome/test/data/instant_extended.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/searchbox/searchbox.cc
diff --git a/chrome/renderer/searchbox/searchbox.cc b/chrome/renderer/searchbox/searchbox.cc
index 9450a1e89f3f2e562a6144bf0f71ec74ae3159fd..bd563a875684ff6ca79e2955d3e7f15d84c09a6c 100644
--- a/chrome/renderer/searchbox/searchbox.cc
+++ b/chrome/renderer/searchbox/searchbox.cc
@@ -453,6 +453,10 @@ void SearchBox::OnSetDisplayInstantResults(bool display_instant_results) {
}
void SearchBox::OnThemeChanged(const ThemeBackgroundInfo& theme_info) {
+ // Do not send duplicate notifications.
+ if (theme_info_ == theme_info)
+ return;
+
theme_info_ = theme_info;
if (render_view()->GetWebView() && render_view()->GetWebView()->mainFrame()) {
extensions_v8::SearchBoxExtension::DispatchThemeChange(
« 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