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

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

Issue 267593005: Refactor menu controller to isolate aura dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes for sky 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
« no previous file with comments | « ui/views/controls/menu/menu_message_loop_mac.cc ('k') | ui/views/views.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 arrow_ = BubbleBorder::NONE; 274 arrow_ = BubbleBorder::NONE;
275 bubble_border_ = NULL; 275 bubble_border_ = NULL;
276 276
277 const MenuConfig& menu_config = 277 const MenuConfig& menu_config =
278 content_view_->GetMenuItem()->GetMenuConfig(); 278 content_view_->GetMenuItem()->GetMenuConfig();
279 279
280 bool use_border = true; 280 bool use_border = true;
281 int padding = menu_config.corner_radius > 0 ? 281 int padding = menu_config.corner_radius > 0 ?
282 kBorderPaddingDueToRoundedCorners : 0; 282 kBorderPaddingDueToRoundedCorners : 0;
283 283
284 #if !(defined(OS_LINUX) && !defined(OS_CHROMEOS)) 284 #if defined(USE_AURA) && !(defined(OS_LINUX) && !defined(OS_CHROMEOS))
285 if (menu_config.native_theme == ui::NativeThemeAura::instance()) { 285 if (menu_config.native_theme == ui::NativeThemeAura::instance()) {
286 // In case of NativeThemeAura the border gets drawn with the shadow. 286 // In case of NativeThemeAura the border gets drawn with the shadow.
287 // Furthermore no additional padding is wanted. 287 // Furthermore no additional padding is wanted.
288 use_border = false; 288 use_border = false;
289 padding = 0; 289 padding = 0;
290 } 290 }
291 #endif 291 #endif
292 292
293 int top = menu_config.menu_vertical_border_size + padding; 293 int top = menu_config.menu_vertical_border_size + padding;
294 int left = menu_config.menu_horizontal_border_size + padding; 294 int left = menu_config.menu_horizontal_border_size + padding;
(...skipping 30 matching lines...) Expand all
325 case MENU_ANCHOR_BUBBLE_ABOVE: 325 case MENU_ANCHOR_BUBBLE_ABOVE:
326 return BubbleBorder::BOTTOM_CENTER; 326 return BubbleBorder::BOTTOM_CENTER;
327 case MENU_ANCHOR_BUBBLE_BELOW: 327 case MENU_ANCHOR_BUBBLE_BELOW:
328 return BubbleBorder::TOP_CENTER; 328 return BubbleBorder::TOP_CENTER;
329 default: 329 default:
330 return BubbleBorder::NONE; 330 return BubbleBorder::NONE;
331 } 331 }
332 } 332 }
333 333
334 } // namespace views 334 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/menu/menu_message_loop_mac.cc ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698