| 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 "third_party/skia/include/core/SkPaint.h" | 8 #include "third_party/skia/include/core/SkPaint.h" |
| 9 #include "third_party/skia/include/core/SkPath.h" | 9 #include "third_party/skia/include/core/SkPath.h" |
| 10 #include "ui/accessibility/ax_view_state.h" | 10 #include "ui/accessibility/ax_view_state.h" |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 gfx::Insets(top, left, bottom, right))); | 297 gfx::Insets(top, left, bottom, right))); |
| 298 } else { | 298 } else { |
| 299 SetBorder(Border::CreateEmptyBorder(top, left, bottom, right)); | 299 SetBorder(Border::CreateEmptyBorder(top, left, bottom, right)); |
| 300 } | 300 } |
| 301 } | 301 } |
| 302 | 302 |
| 303 void MenuScrollViewContainer::CreateBubbleBorder() { | 303 void MenuScrollViewContainer::CreateBubbleBorder() { |
| 304 bubble_border_ = new BubbleBorder(arrow_, | 304 bubble_border_ = new BubbleBorder(arrow_, |
| 305 BubbleBorder::SMALL_SHADOW, | 305 BubbleBorder::SMALL_SHADOW, |
| 306 SK_ColorWHITE); | 306 SK_ColorWHITE); |
| 307 SetBorder(scoped_ptr<Border>(bubble_border_)); | 307 SetBorder(std::unique_ptr<Border>(bubble_border_)); |
| 308 set_background(new BubbleBackground(bubble_border_)); | 308 set_background(new BubbleBackground(bubble_border_)); |
| 309 } | 309 } |
| 310 | 310 |
| 311 BubbleBorder::Arrow MenuScrollViewContainer::BubbleBorderTypeFromAnchor( | 311 BubbleBorder::Arrow MenuScrollViewContainer::BubbleBorderTypeFromAnchor( |
| 312 MenuAnchorPosition anchor) { | 312 MenuAnchorPosition anchor) { |
| 313 switch (anchor) { | 313 switch (anchor) { |
| 314 case MENU_ANCHOR_BUBBLE_LEFT: | 314 case MENU_ANCHOR_BUBBLE_LEFT: |
| 315 return BubbleBorder::RIGHT_CENTER; | 315 return BubbleBorder::RIGHT_CENTER; |
| 316 case MENU_ANCHOR_BUBBLE_RIGHT: | 316 case MENU_ANCHOR_BUBBLE_RIGHT: |
| 317 return BubbleBorder::LEFT_CENTER; | 317 return BubbleBorder::LEFT_CENTER; |
| 318 case MENU_ANCHOR_BUBBLE_ABOVE: | 318 case MENU_ANCHOR_BUBBLE_ABOVE: |
| 319 return BubbleBorder::BOTTOM_CENTER; | 319 return BubbleBorder::BOTTOM_CENTER; |
| 320 case MENU_ANCHOR_BUBBLE_BELOW: | 320 case MENU_ANCHOR_BUBBLE_BELOW: |
| 321 return BubbleBorder::TOP_CENTER; | 321 return BubbleBorder::TOP_CENTER; |
| 322 default: | 322 default: |
| 323 return BubbleBorder::NONE; | 323 return BubbleBorder::NONE; |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 | 326 |
| 327 } // namespace views | 327 } // namespace views |
| OLD | NEW |