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
3 // found in the LICENSE file.
5 #include "chrome/common/instant_types.h"
7 InstantSuggestion::InstantSuggestion()
8 : behavior(INSTANT_COMPLETE_NOW
),
9 type(INSTANT_SUGGESTION_SEARCH
),
10 autocomplete_match_index(kNoMatchIndex
) {
13 InstantSuggestion::InstantSuggestion(const string16
& in_text
,
14 InstantCompleteBehavior in_behavior
,
15 InstantSuggestionType in_type
,
16 const string16
& in_query
,
17 size_t in_autocomplete_match_index
)
19 behavior(in_behavior
),
22 autocomplete_match_index(in_autocomplete_match_index
) {
25 InstantSuggestion::~InstantSuggestion() {
28 InstantAutocompleteResult::InstantAutocompleteResult()
29 : transition(content::PAGE_TRANSITION_LINK
),
33 InstantAutocompleteResult::~InstantAutocompleteResult() {
36 RGBAColor::RGBAColor()
43 RGBAColor::~RGBAColor() {
46 bool RGBAColor::operator==(const RGBAColor
& rhs
) const {
53 ThemeBackgroundInfo::ThemeBackgroundInfo()
54 : using_default_theme(true),
60 section_border_color(),
61 image_horizontal_alignment(THEME_BKGRND_IMAGE_ALIGN_CENTER
),
62 image_vertical_alignment(THEME_BKGRND_IMAGE_ALIGN_CENTER
),
63 image_tiling(THEME_BKGRND_IMAGE_NO_REPEAT
),
65 has_attribution(false),
66 logo_alternate(false) {
69 ThemeBackgroundInfo::~ThemeBackgroundInfo() {
73 bool ThemeBackgroundInfo::operator==(const ThemeBackgroundInfo
& rhs
) const {
74 return using_default_theme
== rhs
.using_default_theme
&&
75 background_color
== rhs
.background_color
&&
76 text_color
== rhs
.text_color
&&
77 link_color
== rhs
.link_color
&&
78 text_color_light
== rhs
.text_color_light
&&
79 header_color
== rhs
.header_color
&&
80 section_border_color
== rhs
.section_border_color
&&
81 theme_id
== rhs
.theme_id
&&
82 image_horizontal_alignment
== rhs
.image_horizontal_alignment
&&
83 image_vertical_alignment
== rhs
.image_vertical_alignment
&&
84 image_tiling
== rhs
.image_tiling
&&
85 image_height
== rhs
.image_height
&&
86 has_attribution
== rhs
.has_attribution
&&
87 logo_alternate
== rhs
.logo_alternate
;