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

Side by Side Diff: ui/views/bubble/bubble_border_2.cc

Issue 10828266: Minor fixes to BubbleBorder2 and LauncherTooltipManager: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years, 4 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 | « ash/launcher/launcher_tooltip_manager.cc ('k') | ui/views/bubble/bubble_delegate.h » ('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 #include "ui/views/bubble/bubble_border_2.h" 5 #include "ui/views/bubble/bubble_border_2.h"
6 6
7 #include <algorithm> // for std::max 7 #include <algorithm> // for std::max
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/gfx/canvas.h" 10 #include "ui/gfx/canvas.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 arrow_height_, 185 arrow_height_,
186 arrow_width_); 186 arrow_width_);
187 } 187 }
188 188
189 void BubbleBorder2::SetShadow(gfx::ShadowValue shadow) { 189 void BubbleBorder2::SetShadow(gfx::ShadowValue shadow) {
190 shadows_.clear(); 190 shadows_.clear();
191 shadows_.push_back(shadow); 191 shadows_.push_back(shadow);
192 } 192 }
193 193
194 int BubbleBorder2::GetBorderThickness() const { 194 int BubbleBorder2::GetBorderThickness() const {
195 return 0; 195 return border_size_;
196 } 196 }
197 197
198 void BubbleBorder2::PaintBackground(gfx::Canvas* canvas, 198 void BubbleBorder2::PaintBackground(gfx::Canvas* canvas,
199 const gfx::Rect& bounds) const { 199 const gfx::Rect& bounds) const {
200 canvas->FillRect(bounds, background_color_); 200 canvas->FillRect(bounds, background_color_);
201 } 201 }
202 202
203 int BubbleBorder2::GetArrowOffset() const { 203 int BubbleBorder2::GetArrowOffset() const {
204 if (has_arrow(arrow_location())) { 204 if (has_arrow(arrow_location())) {
205 if (is_arrow_on_horizontal(arrow_location())) { 205 if (is_arrow_on_horizontal(arrow_location())) {
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 canvas->ClipPath(path); 390 canvas->ClipPath(path);
391 391
392 // Use full bounds so that arrow is also painted. 392 // Use full bounds so that arrow is also painted.
393 const gfx::Rect& bounds = view.bounds(); 393 const gfx::Rect& bounds = view.bounds();
394 PaintBackground(canvas, bounds); 394 PaintBackground(canvas, bounds);
395 395
396 canvas->Restore(); 396 canvas->Restore();
397 } 397 }
398 398
399 } // namespace views 399 } // namespace views
OLDNEW
« no previous file with comments | « ash/launcher/launcher_tooltip_manager.cc ('k') | ui/views/bubble/bubble_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698