Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(559)

Side by Side Diff: ui/views/controls/menu/menu_scroll_view_container.cc

Issue 250943008: Move enum MenuAnchorPosition to reduce deps on menu_item_view.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indent Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 MenuAnchorPosition anchor) {
320 MenuItemView::AnchorPosition anchor) {
321 switch (anchor) { 320 switch (anchor) {
322 case views::MenuItemView::BUBBLE_LEFT: 321 case MENU_ANCHOR_BUBBLE_LEFT:
323 return BubbleBorder::RIGHT_CENTER; 322 return BubbleBorder::RIGHT_CENTER;
324 case views::MenuItemView::BUBBLE_RIGHT: 323 case MENU_ANCHOR_BUBBLE_RIGHT:
325 return BubbleBorder::LEFT_CENTER; 324 return BubbleBorder::LEFT_CENTER;
326 case views::MenuItemView::BUBBLE_ABOVE: 325 case MENU_ANCHOR_BUBBLE_ABOVE:
327 return BubbleBorder::BOTTOM_CENTER; 326 return BubbleBorder::BOTTOM_CENTER;
328 case views::MenuItemView::BUBBLE_BELOW: 327 case 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
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_scroll_view_container.h ('k') | ui/views/controls/menu/menu_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698