| 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/controls/menu/menu_scroll_view_container.h" | 5 #include "ui/views/controls/menu/menu_scroll_view_container.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "third_party/skia/include/core/SkPaint.h" | 9 #include "third_party/skia/include/core/SkPaint.h" |
| 10 #include "third_party/skia/include/core/SkPath.h" | 10 #include "third_party/skia/include/core/SkPath.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 int left = menu_config.menu_horizontal_border_size + padding; | 287 int left = menu_config.menu_horizontal_border_size + padding; |
| 288 int bottom = menu_config.menu_vertical_border_size + padding; | 288 int bottom = menu_config.menu_vertical_border_size + padding; |
| 289 int right = menu_config.menu_horizontal_border_size + padding; | 289 int right = menu_config.menu_horizontal_border_size + padding; |
| 290 | 290 |
| 291 if (menu_config.use_outer_border) { | 291 if (menu_config.use_outer_border) { |
| 292 SkColor color = GetNativeTheme() | 292 SkColor color = GetNativeTheme() |
| 293 ? GetNativeTheme()->GetSystemColor( | 293 ? GetNativeTheme()->GetSystemColor( |
| 294 ui::NativeTheme::kColorId_MenuBorderColor) | 294 ui::NativeTheme::kColorId_MenuBorderColor) |
| 295 : gfx::kPlaceholderColor; | 295 : gfx::kPlaceholderColor; |
| 296 SetBorder(views::Border::CreateBorderPainter( | 296 SetBorder(views::Border::CreateBorderPainter( |
| 297 base::WrapUnique( | 297 base::MakeUnique<views::RoundRectPainter>(color, |
| 298 new views::RoundRectPainter(color, menu_config.corner_radius)), | 298 menu_config.corner_radius), |
| 299 gfx::Insets(top, left, bottom, right))); | 299 gfx::Insets(top, left, bottom, right))); |
| 300 } else { | 300 } else { |
| 301 SetBorder(Border::CreateEmptyBorder(top, left, bottom, right)); | 301 SetBorder(Border::CreateEmptyBorder(top, left, bottom, right)); |
| 302 } | 302 } |
| 303 } | 303 } |
| 304 | 304 |
| 305 void MenuScrollViewContainer::CreateBubbleBorder() { | 305 void MenuScrollViewContainer::CreateBubbleBorder() { |
| 306 bubble_border_ = new BubbleBorder(arrow_, | 306 bubble_border_ = new BubbleBorder(arrow_, |
| 307 BubbleBorder::SMALL_SHADOW, | 307 BubbleBorder::SMALL_SHADOW, |
| 308 SK_ColorWHITE); | 308 SK_ColorWHITE); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 320 case MENU_ANCHOR_BUBBLE_ABOVE: | 320 case MENU_ANCHOR_BUBBLE_ABOVE: |
| 321 return BubbleBorder::BOTTOM_CENTER; | 321 return BubbleBorder::BOTTOM_CENTER; |
| 322 case MENU_ANCHOR_BUBBLE_BELOW: | 322 case MENU_ANCHOR_BUBBLE_BELOW: |
| 323 return BubbleBorder::TOP_CENTER; | 323 return BubbleBorder::TOP_CENTER; |
| 324 default: | 324 default: |
| 325 return BubbleBorder::NONE; | 325 return BubbleBorder::NONE; |
| 326 } | 326 } |
| 327 } | 327 } |
| 328 | 328 |
| 329 } // namespace views | 329 } // namespace views |
| OLD | NEW |