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 "ash/app_list/app_list_bubble_border.h" | 5 #include "ui/app_list/app_list_bubble_border.h" |
6 | 6 |
7 #include "third_party/skia/include/core/SkPath.h" | 7 #include "third_party/skia/include/core/SkPath.h" |
8 #include "third_party/skia/include/core/SkPaint.h" | 8 #include "third_party/skia/include/core/SkPaint.h" |
9 #include "third_party/skia/include/effects/SkBlurDrawLooper.h" | 9 #include "third_party/skia/include/effects/SkBlurDrawLooper.h" |
10 #include "third_party/skia/include/effects/SkGradientShader.h" | 10 #include "third_party/skia/include/effects/SkGradientShader.h" |
11 #include "ui/gfx/canvas.h" | 11 #include "ui/gfx/canvas.h" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 const int kCornerRadius = 3; | 15 const int kCornerRadius = 3; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 path->lineTo(center_x + arrow_offset - half_array_width, bottom); | 78 path->lineTo(center_x + arrow_offset - half_array_width, bottom); |
79 path->lineTo(center_x + arrow_offset, bottom + arrow_height); | 79 path->lineTo(center_x + arrow_offset, bottom + arrow_height); |
80 path->lineTo(center_x + arrow_offset + half_array_width, bottom); | 80 path->lineTo(center_x + arrow_offset + half_array_width, bottom); |
81 path->arcTo(right, bottom, right, center_y, SkIntToScalar(kCornerRadius)); | 81 path->arcTo(right, bottom, right, center_y, SkIntToScalar(kCornerRadius)); |
82 path->arcTo(right, top, center_x, top, SkIntToScalar(kCornerRadius)); | 82 path->arcTo(right, top, center_x, top, SkIntToScalar(kCornerRadius)); |
83 path->close(); | 83 path->close(); |
84 } | 84 } |
85 | 85 |
86 } // namespace | 86 } // namespace |
87 | 87 |
88 namespace ash { | 88 namespace app_list { |
89 | 89 |
90 AppListBubbleBorder::AppListBubbleBorder(views::View* app_list_view) | 90 AppListBubbleBorder::AppListBubbleBorder(views::View* app_list_view) |
91 : views::BubbleBorder(views::BubbleBorder::BOTTOM_RIGHT, | 91 : views::BubbleBorder(views::BubbleBorder::BOTTOM_RIGHT, |
92 views::BubbleBorder::NO_SHADOW), | 92 views::BubbleBorder::NO_SHADOW), |
93 app_list_view_(app_list_view), | 93 app_list_view_(app_list_view), |
94 arrow_offset_(0) { | 94 arrow_offset_(0) { |
95 } | 95 } |
96 | 96 |
97 AppListBubbleBorder::~AppListBubbleBorder() { | 97 AppListBubbleBorder::~AppListBubbleBorder() { |
98 } | 98 } |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 &path); | 203 &path); |
204 canvas->Save(); | 204 canvas->Save(); |
205 canvas->ClipPath(path); | 205 canvas->ClipPath(path); |
206 | 206 |
207 PaintModelViewBackground(canvas, bounds); | 207 PaintModelViewBackground(canvas, bounds); |
208 PaintPageSwitcherBackground(canvas, bounds); | 208 PaintPageSwitcherBackground(canvas, bounds); |
209 | 209 |
210 canvas->Restore(); | 210 canvas->Restore(); |
211 } | 211 } |
212 | 212 |
213 } // namespace ash | 213 } // namespace app_list |
OLD | NEW |