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> | 7 #include <algorithm> |
| 8 #include <vector> |
8 | 9 |
9 #include "base/logging.h" | 10 #include "base/logging.h" |
10 #include "third_party/skia/include/core/SkDrawLooper.h" | 11 #include "third_party/skia/include/core/SkDrawLooper.h" |
11 #include "third_party/skia/include/core/SkPaint.h" | 12 #include "third_party/skia/include/core/SkPaint.h" |
12 #include "third_party/skia/include/core/SkPath.h" | 13 #include "third_party/skia/include/core/SkPath.h" |
13 #include "ui/base/material_design/material_design_controller.h" | 14 #include "ui/base/material_design/material_design_controller.h" |
14 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
15 #include "ui/gfx/canvas.h" | 16 #include "ui/gfx/canvas.h" |
16 #include "ui/gfx/geometry/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
17 #include "ui/gfx/path.h" | 18 #include "ui/gfx/path.h" |
18 #include "ui/gfx/scoped_canvas.h" | 19 #include "ui/gfx/scoped_canvas.h" |
| 20 #include "ui/gfx/shadow_value.h" |
19 #include "ui/gfx/skia_util.h" | 21 #include "ui/gfx/skia_util.h" |
20 #include "ui/resources/grit/ui_resources.h" | 22 #include "ui/resources/grit/ui_resources.h" |
21 #include "ui/views/painter.h" | 23 #include "ui/views/painter.h" |
22 #include "ui/views/resources/grit/views_resources.h" | 24 #include "ui/views/resources/grit/views_resources.h" |
23 #include "ui/views/view.h" | 25 #include "ui/views/view.h" |
24 | 26 |
25 namespace views { | 27 namespace views { |
26 | 28 |
27 namespace internal { | 29 namespace internal { |
28 | 30 |
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 paint.setStyle(SkPaint::kFill_Style); | 575 paint.setStyle(SkPaint::kFill_Style); |
574 paint.setColor(border_->background_color()); | 576 paint.setColor(border_->background_color()); |
575 SkPath path; | 577 SkPath path; |
576 gfx::RectF bounds(view->GetLocalBounds()); | 578 gfx::RectF bounds(view->GetLocalBounds()); |
577 bounds.Inset(gfx::InsetsF(border_->GetInsets())); | 579 bounds.Inset(gfx::InsetsF(border_->GetInsets())); |
578 | 580 |
579 canvas->DrawRoundRect(bounds, border_->GetBorderCornerRadius(), paint); | 581 canvas->DrawRoundRect(bounds, border_->GetBorderCornerRadius(), paint); |
580 } | 582 } |
581 | 583 |
582 } // namespace views | 584 } // namespace views |
OLD | NEW |