OLD | NEW |
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.h" | 5 #include "ui/views/bubble/bubble_border.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 "grit/ui_resources.h" | 10 #include "grit/ui_resources.h" |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 7, 0, 4); | 360 7, 0, 4); |
361 break; | 361 break; |
362 case BIG_SHADOW: | 362 case BIG_SHADOW: |
363 images = new BorderImages(kBigShadowImages, | 363 images = new BorderImages(kBigShadowImages, |
364 arraysize(kBigShadowImages), | 364 arraysize(kBigShadowImages), |
365 9, 0, 3); | 365 9, 0, 3); |
366 break; | 366 break; |
367 case SMALL_SHADOW: | 367 case SMALL_SHADOW: |
368 images = new BorderImages(kSmallShadowImages, | 368 images = new BorderImages(kSmallShadowImages, |
369 arraysize(kSmallShadowImages), | 369 arraysize(kSmallShadowImages), |
370 9, 0, 3); | 370 6, 0, 3); |
371 break; | 371 break; |
372 case SHADOW_COUNT: | 372 case SHADOW_COUNT: |
373 NOTREACHED(); | 373 NOTREACHED(); |
374 break; | 374 break; |
375 } | 375 } |
376 | 376 |
377 return images; | 377 return images; |
378 } | 378 } |
379 | 379 |
380 BubbleBorder::~BubbleBorder() {} | 380 BubbleBorder::~BubbleBorder() {} |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 paint.setColor(border_->background_color()); | 624 paint.setColor(border_->background_color()); |
625 SkPath path; | 625 SkPath path; |
626 gfx::Rect bounds(view->GetContentsBounds()); | 626 gfx::Rect bounds(view->GetContentsBounds()); |
627 bounds.Inset(-border_->GetBorderThickness(), -border_->GetBorderThickness()); | 627 bounds.Inset(-border_->GetBorderThickness(), -border_->GetBorderThickness()); |
628 SkScalar radius = SkIntToScalar(border_->GetBorderCornerRadius()); | 628 SkScalar radius = SkIntToScalar(border_->GetBorderCornerRadius()); |
629 path.addRoundRect(gfx::RectToSkRect(bounds), radius, radius); | 629 path.addRoundRect(gfx::RectToSkRect(bounds), radius, radius); |
630 canvas->DrawPath(path, paint); | 630 canvas->DrawPath(path, paint); |
631 } | 631 } |
632 | 632 |
633 } // namespace views | 633 } // namespace views |
OLD | NEW |