| 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 "third_party/skia/include/core/SkPaint.h" | 7 #include "third_party/skia/include/core/SkPaint.h" |
| 8 #include "third_party/skia/include/core/SkPath.h" | 8 #include "third_party/skia/include/core/SkPath.h" |
| 9 #include "ui/accessibility/ax_view_state.h" | 9 #include "ui/accessibility/ax_view_state.h" |
| 10 #include "ui/gfx/canvas.h" | 10 #include "ui/gfx/canvas.h" |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 } | 308 } |
| 309 | 309 |
| 310 void MenuScrollViewContainer::CreateBubbleBorder() { | 310 void MenuScrollViewContainer::CreateBubbleBorder() { |
| 311 bubble_border_ = new BubbleBorder(arrow_, | 311 bubble_border_ = new BubbleBorder(arrow_, |
| 312 BubbleBorder::SMALL_SHADOW, | 312 BubbleBorder::SMALL_SHADOW, |
| 313 SK_ColorWHITE); | 313 SK_ColorWHITE); |
| 314 SetBorder(scoped_ptr<Border>(bubble_border_)); | 314 SetBorder(scoped_ptr<Border>(bubble_border_)); |
| 315 set_background(new BubbleBackground(bubble_border_)); | 315 set_background(new BubbleBackground(bubble_border_)); |
| 316 } | 316 } |
| 317 | 317 |
| 318 BubbleBorder::Arrow | 318 BubbleBorder::Arrow MenuScrollViewContainer::BubbleBorderTypeFromAnchor( |
| 319 MenuScrollViewContainer::BubbleBorderTypeFromAnchor( | 319 ui::MenuAnchorPosition anchor) { |
| 320 MenuItemView::AnchorPosition anchor) { | |
| 321 switch (anchor) { | 320 switch (anchor) { |
| 322 case views::MenuItemView::BUBBLE_LEFT: | 321 case ui::MENU_ANCHOR_BUBBLE_LEFT: |
| 323 return BubbleBorder::RIGHT_CENTER; | 322 return BubbleBorder::RIGHT_CENTER; |
| 324 case views::MenuItemView::BUBBLE_RIGHT: | 323 case ui::MENU_ANCHOR_BUBBLE_RIGHT: |
| 325 return BubbleBorder::LEFT_CENTER; | 324 return BubbleBorder::LEFT_CENTER; |
| 326 case views::MenuItemView::BUBBLE_ABOVE: | 325 case ui::MENU_ANCHOR_BUBBLE_ABOVE: |
| 327 return BubbleBorder::BOTTOM_CENTER; | 326 return BubbleBorder::BOTTOM_CENTER; |
| 328 case views::MenuItemView::BUBBLE_BELOW: | 327 case ui::MENU_ANCHOR_BUBBLE_BELOW: |
| 329 return BubbleBorder::TOP_CENTER; | 328 return BubbleBorder::TOP_CENTER; |
| 330 default: | 329 default: |
| 331 return BubbleBorder::NONE; | 330 return BubbleBorder::NONE; |
| 332 } | 331 } |
| 333 } | 332 } |
| 334 | 333 |
| 335 } // namespace views | 334 } // namespace views |
| OLD | NEW |