Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Issue 8555025: aura: Draw drop shadows under browsers and menus. (Closed)

Created:
9 years, 1 month ago by Daniel Erat
Modified:
9 years, 1 month ago
CC:
chromium-reviews, tfarina, dhollowa, Paweł Hajdan Jr., oshima
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=111009

Patch Set 1 #

Total comments: 8

Patch Set 2 : move implementation into the shell #

Patch Set 3 : minor changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1133 lines, -15 lines) Patch
M chrome/browser/ui/views/frame/browser_frame_aura.cc View 1 2 chunks +6 lines, -0 lines 0 comments Download
M ui/aura/aura_switches.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/aura_switches.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M ui/aura/client/aura_constants.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M ui/aura/client/aura_constants.cc View 1 1 chunk +7 lines, -6 lines 0 comments Download
A ui/aura/client/shadow_types.h View 1 1 chunk +20 lines, -0 lines 0 comments Download
M ui/aura/desktop.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M ui/aura/desktop.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M ui/aura/desktop_observer.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M ui/aura/window.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M ui/aura/window.cc View 1 8 chunks +22 lines, -0 lines 0 comments Download
M ui/aura/window_observer.h View 1 1 chunk +19 lines, -4 lines 0 comments Download
M ui/aura_shell/aura_shell.gyp View 1 3 chunks +8 lines, -0 lines 0 comments Download
M ui/aura_shell/desktop_layout_manager.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/aura_shell/desktop_layout_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
A ui/aura_shell/image_grid.h View 1 1 chunk +187 lines, -0 lines 0 comments Download
A ui/aura_shell/image_grid.cc View 1 1 chunk +182 lines, -0 lines 0 comments Download
A ui/aura_shell/image_grid_unittest.cc View 1 2 1 chunk +201 lines, -0 lines 0 comments Download
A ui/aura_shell/shadow.h View 1 1 chunk +53 lines, -0 lines 0 comments Download
A ui/aura_shell/shadow.cc View 1 1 chunk +54 lines, -0 lines 0 comments Download
A ui/aura_shell/shadow_controller.h View 1 1 chunk +96 lines, -0 lines 0 comments Download
A ui/aura_shell/shadow_controller.cc View 1 1 chunk +143 lines, -0 lines 0 comments Download
A ui/aura_shell/shadow_controller_unittest.cc View 1 1 chunk +90 lines, -0 lines 0 comments Download
M ui/aura_shell/shell.h View 1 3 chunks +7 lines, -0 lines 0 comments Download
M ui/aura_shell/shell.cc View 1 3 chunks +4 lines, -2 lines 0 comments Download
M ui/aura_shell/show_state_controller.h View 1 1 chunk +1 line, -1 line 0 comments Download
M views/widget/native_widget_aura.cc View 1 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Daniel Erat
http://codereview.chromium.org/8555025/diff/1/chrome/browser/ui/views/frame/browser_frame_aura.cc File chrome/browser/ui/views/frame/browser_frame_aura.cc (right): http://codereview.chromium.org/8555025/diff/1/chrome/browser/ui/views/frame/browser_frame_aura.cc#newcode174 chrome/browser/ui/views/frame/browser_frame_aura.cc:174: GetNativeWindow()->SetShadowVisible(true); Oshima recommended setting a new property for this, ...
9 years, 1 month ago (2011-11-15 01:05:04 UTC) #1
sky
We've generally gone with very little features in aura itself, just the bare minimum, and ...
9 years, 1 month ago (2011-11-15 04:49:13 UTC) #2
sky
http://codereview.chromium.org/8555025/diff/1/views/widget/native_widget_aura.cc File views/widget/native_widget_aura.cc (right): http://codereview.chromium.org/8555025/diff/1/views/widget/native_widget_aura.cc#newcode162 views/widget/native_widget_aura.cc:162: } One more comment here. Are we really going ...
9 years, 1 month ago (2011-11-15 04:50:40 UTC) #3
Ben Goodger (Google)
Indeed. We do all our image-drawing and layout in views. e.g. NonClientFrameView.
9 years, 1 month ago (2011-11-15 04:53:41 UTC) #4
Daniel Erat
On 2011/11/15 04:53:41, Ben Goodger (Google) wrote: > Indeed. We do all our image-drawing and ...
9 years, 1 month ago (2011-11-15 15:54:34 UTC) #5
Ben Goodger (Google)
I agree scaling the shadow in some situations may be undesirable, but it's not clear ...
9 years, 1 month ago (2011-11-15 17:05:31 UTC) #6
Daniel Erat
I'm looking into expanding WindowObserver's methods so this can happen in the shell instead. http://codereview.chromium.org/8555025/diff/1/ui/aura/shadow.h ...
9 years, 1 month ago (2011-11-15 17:52:58 UTC) #7
Daniel Erat
Another look? I've moved this into the shell.
9 years, 1 month ago (2011-11-21 18:26:54 UTC) #8
Ben Goodger (Google)
9 years, 1 month ago (2011-11-21 18:53:14 UTC) #9
Nice! LGTM.

Powered by Google App Engine
This is Rietveld 408576698