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

Unified Diff: ash/wm/shadow_controller.cc

Issue 9169050: aura: No shadow for transparent window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no shadow for transparent window Created 8 years, 11 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 | « ash/tooltips/tooltip_controller.cc ('k') | ui/aura/window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/shadow_controller.cc
diff --git a/ash/wm/shadow_controller.cc b/ash/wm/shadow_controller.cc
index 6f5a530ee7b9c73f5d78d70fb57ec02d1104dc6d..2d57d33cc61e9b8dfebdc1aef9308ca2b2f504ac 100644
--- a/ash/wm/shadow_controller.cc
+++ b/ash/wm/shadow_controller.cc
@@ -22,16 +22,17 @@ namespace internal {
namespace {
-ShadowType GetShadowTypeFromWindowType(aura::Window* window) {
+ShadowType GetShadowTypeFromWindow(aura::Window* window) {
switch (window->type()) {
Ben Goodger (Google) 2012/01/25 23:02:36 I think as a general rule transparent windows shou
xiyuan 2012/01/25 23:33:14 Done.
case aura::client::WINDOW_TYPE_NORMAL:
case aura::client::WINDOW_TYPE_PANEL:
return CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAuraTranslucentFrames) ?
+ switches::kAuraTranslucentFrames) || window->transparent() ?
SHADOW_TYPE_NONE : SHADOW_TYPE_RECTANGULAR;
case aura::client::WINDOW_TYPE_MENU:
case aura::client::WINDOW_TYPE_TOOLTIP:
- return SHADOW_TYPE_RECTANGULAR;
+ return window->transparent() ? SHADOW_TYPE_NONE :
+ SHADOW_TYPE_RECTANGULAR;
default:
break;
}
@@ -54,7 +55,7 @@ ShadowController::~ShadowController() {
void ShadowController::OnWindowInitialized(aura::Window* window) {
window->AddObserver(this);
- SetShadowType(window, GetShadowTypeFromWindowType(window));
+ SetShadowType(window, GetShadowTypeFromWindow(window));
HandlePossibleShadowVisibilityChange(window);
}
« no previous file with comments | « ash/tooltips/tooltip_controller.cc ('k') | ui/aura/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698