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

Side by Side Diff: ui/views/bubble/bubble_border.h

Issue 10939010: Cleanup: avoid foo ? true : false, part 1. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 2 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 | « ui/gfx/canvas_skia.cc ('k') | ui/views/focus/focus_search.cc » ('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 UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_
6 #define UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ 6 #define UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/views/background.h" 10 #include "ui/views/background.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 return (loc == TOP_CENTER || loc == BOTTOM_CENTER || loc >= NONE) ? 89 return (loc == TOP_CENTER || loc == BOTTOM_CENTER || loc >= NONE) ?
90 loc : static_cast<ArrowLocation>(loc ^ RIGHT); 90 loc : static_cast<ArrowLocation>(loc ^ RIGHT);
91 } 91 }
92 92
93 static ArrowLocation vertical_mirror(ArrowLocation loc) { 93 static ArrowLocation vertical_mirror(ArrowLocation loc) {
94 return (loc == LEFT_CENTER || loc == RIGHT_CENTER || loc >= NONE) ? 94 return (loc == LEFT_CENTER || loc == RIGHT_CENTER || loc >= NONE) ?
95 loc : static_cast<ArrowLocation>(loc ^ BOTTOM); 95 loc : static_cast<ArrowLocation>(loc ^ BOTTOM);
96 } 96 }
97 97
98 static bool has_arrow(ArrowLocation loc) { 98 static bool has_arrow(ArrowLocation loc) {
99 return loc >= NONE ? false : true; 99 return loc < NONE;
100 } 100 }
101 101
102 static bool is_arrow_on_left(ArrowLocation loc) { 102 static bool is_arrow_on_left(ArrowLocation loc) {
103 return (loc == TOP_CENTER || loc == BOTTOM_CENTER || loc >= NONE) ? 103 return (loc == TOP_CENTER || loc == BOTTOM_CENTER || loc >= NONE) ?
104 false : !(loc & RIGHT); 104 false : !(loc & RIGHT);
105 } 105 }
106 106
107 static bool is_arrow_on_top(ArrowLocation loc) { 107 static bool is_arrow_on_top(ArrowLocation loc) {
108 return (loc == LEFT_CENTER || loc == RIGHT_CENTER || loc >= NONE) ? 108 return (loc == LEFT_CENTER || loc == RIGHT_CENTER || loc >= NONE) ?
109 false : !(loc & BOTTOM); 109 false : !(loc & BOTTOM);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 private: 215 private:
216 BubbleBorder* border_; 216 BubbleBorder* border_;
217 217
218 DISALLOW_COPY_AND_ASSIGN(BubbleBackground); 218 DISALLOW_COPY_AND_ASSIGN(BubbleBackground);
219 }; 219 };
220 220
221 } // namespace views 221 } // namespace views
222 222
223 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_ 223 #endif // UI_VIEWS_BUBBLE_BUBBLE_BORDER_H_
OLDNEW
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/views/focus/focus_search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698