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

Side by Side Diff: chrome/common/search_types.h

Issue 12631008: alternate ntp: implement Show/HideBars API to reduce jank when showing/hiding bars (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed build break Created 7 years, 9 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/render_messages.h ('k') | chrome/renderer/resources/extensions/searchbox_api.js » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef CHROME_COMMON_SEARCH_TYPES_H_ 5 #ifndef CHROME_COMMON_SEARCH_TYPES_H_
6 #define CHROME_COMMON_SEARCH_TYPES_H_ 6 #define CHROME_COMMON_SEARCH_TYPES_H_
7 7
8 namespace chrome { 8 namespace chrome {
9 namespace search { 9 namespace search {
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 Mode(Type in_mode, Origin in_origin) 44 Mode(Type in_mode, Origin in_origin)
45 : mode(in_mode), 45 : mode(in_mode),
46 origin(in_origin) { 46 origin(in_origin) {
47 } 47 }
48 48
49 bool operator==(const Mode& rhs) const { 49 bool operator==(const Mode& rhs) const {
50 return mode == rhs.mode && origin == rhs.origin; 50 return mode == rhs.mode && origin == rhs.origin;
51 } 51 }
52 52
53 bool operator!=(const Mode& rhs) const {
54 return !(*this == rhs);
55 }
56
53 bool is_default() const { 57 bool is_default() const {
54 return mode == MODE_DEFAULT; 58 return mode == MODE_DEFAULT;
55 } 59 }
56 60
57 bool is_ntp() const { 61 bool is_ntp() const {
58 return mode == MODE_NTP; 62 return mode == MODE_NTP;
59 } 63 }
60 64
61 bool is_search() const { 65 bool is_search() const {
62 return mode == MODE_SEARCH_SUGGESTIONS || mode == MODE_SEARCH_RESULTS; 66 return mode == MODE_SEARCH_SUGGESTIONS || mode == MODE_SEARCH_RESULTS;
(...skipping 20 matching lines...) Expand all
83 } 87 }
84 88
85 Type mode; 89 Type mode;
86 Origin origin; 90 Origin origin;
87 }; 91 };
88 92
89 } // namespace search 93 } // namespace search
90 } // namespace chrome 94 } // namespace chrome
91 95
92 #endif // CHROME_COMMON_SEARCH_TYPES_H_ 96 #endif // CHROME_COMMON_SEARCH_TYPES_H_
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/resources/extensions/searchbox_api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698