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

Unified Diff: chrome/common/instant_types.h

Issue 14805004: InstantExtended: Prevent spurious themechanged/mostvisitedchanged events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Prevent event triggers from searchbox Created 7 years, 8 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 | « no previous file | chrome/renderer/searchbox/searchbox.cc » ('j') | chrome/renderer/searchbox/searchbox.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/instant_types.h
diff --git a/chrome/common/instant_types.h b/chrome/common/instant_types.h
index 07f4eb457b5dce288f283f5e19f208fd2ae46a6b..fc81e6be0bb5bcf9a378cbfa4da458f91d12b247 100644
--- a/chrome/common/instant_types.h
+++ b/chrome/common/instant_types.h
@@ -156,6 +156,32 @@ struct ThemeBackgroundInfo {
// True if theme has attribution logo.
// Value is only valid if |theme_id| is valid.
bool has_attribution;
+
+ bool operator==(const ThemeBackgroundInfo& other) const {
samarth 2013/05/03 21:24:42 Don't overload operators please. Just add a helpe
+ return color_r == other.color_r &&
+ color_g == other.color_g &&
+ color_b == other.color_b &&
+ color_a == other.color_a &&
+ theme_id == other.theme_id &&
+ image_horizontal_alignment == other.image_horizontal_alignment &&
+ image_vertical_alignment == other.image_vertical_alignment &&
+ image_tiling == other.image_tiling &&
+ image_height == other.image_height &&
+ has_attribution == other.has_attribution;
+ }
+
+ bool operator!=(const ThemeBackgroundInfo& other) const {
+ return color_r != other.color_r ||
+ color_g != other.color_g ||
+ color_b != other.color_b ||
+ color_a != other.color_a ||
+ theme_id != other.theme_id ||
+ image_horizontal_alignment != other.image_horizontal_alignment ||
+ image_vertical_alignment != other.image_vertical_alignment ||
+ image_tiling != other.image_tiling ||
+ image_height != other.image_height ||
+ has_attribution != other.has_attribution;
+ }
};
struct InstantMostVisitedItem {
« no previous file with comments | « no previous file | chrome/renderer/searchbox/searchbox.cc » ('j') | chrome/renderer/searchbox/searchbox.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698