summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-21 22:03:34 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-21 22:03:34 +0000
commita54e65be68a438559f1c11c6ac1cbcc8999528cf (patch)
treefa15db2b97e60f247b60b97f63b49e1410c90020 /views/widget
parent844b10080bdf0658c1535141d4f24380d7625c7a (diff)
downloadchromium_src-a54e65be68a438559f1c11c6ac1cbcc8999528cf.zip
chromium_src-a54e65be68a438559f1c11c6ac1cbcc8999528cf.tar.gz
chromium_src-a54e65be68a438559f1c11c6ac1cbcc8999528cf.tar.bz2
aura: Draw drop shadows under browsers and menus.
This is largely a port of the existing X window manager's code for drawing shadows around windows. It adds an ImageGrid class for drawing a scaled 3x3 grid of gfx::Images and a Shadow class (managed by aura_shell::ShadowController) that uses ImageGrid to draw a shadow. Shadows can be disabled via --aura-no-shadows. BUG=101977 TEST=added unit tests; also manually checked that shadows get drawn Review URL: http://codereview.chromium.org/8555025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111009 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/native_widget_aura.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/views/widget/native_widget_aura.cc b/views/widget/native_widget_aura.cc
index 57677f5..48450b7b 100644
--- a/views/widget/native_widget_aura.cc
+++ b/views/widget/native_widget_aura.cc
@@ -8,6 +8,7 @@
#include "base/string_util.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/drag_drop_client.h"
+#include "ui/aura/client/shadow_types.h"
#include "ui/aura/desktop.h"
#include "ui/aura/desktop_observer.h"
#include "ui/aura/event.h"
@@ -160,12 +161,17 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) {
GetWidget()->GetRootView());
tooltip_manager_.reset(manager);
}
+
drop_helper_.reset(new DropHelper(GetWidget()->GetRootView()));
if (params.type != Widget::InitParams::TYPE_TOOLTIP &&
params.type != Widget::InitParams::TYPE_POPUP) {
window_->SetProperty(aura::kDragDropDelegateKey,
static_cast<aura::WindowDragDropDelegate*>(this));
}
+
+ if (window_type == Widget::InitParams::TYPE_MENU)
+ window_->SetIntProperty(aura::kShadowTypeKey,
+ aura::SHADOW_TYPE_RECTANGULAR);
}
NonClientFrameView* NativeWidgetAura::CreateNonClientFrameView() {