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

Unified Diff: ui/views/controls/menu/menu_host.cc

Issue 290553002: Refactor menu dependency on aura/wm SetShadowType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename enum 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/touchui/touch_selection_controller_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_host.cc
diff --git a/ui/views/controls/menu/menu_host.cc b/ui/views/controls/menu/menu_host.cc
index 15ed811ddd77d6187a41d8c4f1ad4970735a15d4..ad7915a22eedc3207188a94bfe539a6527e2be6b 100644
--- a/ui/views/controls/menu/menu_host.cc
+++ b/ui/views/controls/menu/menu_host.cc
@@ -17,7 +17,6 @@
#include "ui/views/round_rect_painter.h"
#include "ui/views/widget/native_widget_private.h"
#include "ui/views/widget/widget.h"
-#include "ui/wm/core/shadow_types.h"
namespace views {
@@ -46,7 +45,8 @@ void MenuHost::InitMenuHost(Widget* parent,
bool rounded_border = menu_controller && menu_config.corner_radius > 0;
bool bubble_border = submenu_->GetScrollViewContainer() &&
submenu_->GetScrollViewContainer()->HasBubbleBorder();
- params.has_dropshadow = !bubble_border;
+ params.shadow_type = bubble_border ? Widget::InitParams::SHADOW_TYPE_NONE
+ : Widget::InitParams::SHADOW_TYPE_DROP;
params.opacity = (bubble_border || rounded_border) ?
Widget::InitParams::TRANSLUCENT_WINDOW :
Widget::InitParams::OPAQUE_WINDOW;
@@ -54,9 +54,6 @@ void MenuHost::InitMenuHost(Widget* parent,
params.bounds = bounds;
Init(params);
- if (bubble_border)
- SetShadowType(GetNativeView(), wm::SHADOW_TYPE_NONE);
-
SetContentsView(contents_view);
if (bubble_border || rounded_border)
SetOpacity(0);
« no previous file with comments | « no previous file | ui/views/touchui/touch_selection_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698