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

Side by Side Diff: chrome/browser/ui/views/frame/browser_frame_aura.cc

Issue 8555025: aura: Draw drop shadows under browsers and menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | « no previous file | ui/aura/aura.gyp » ('j') | ui/aura/shadow.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/views/frame/browser_frame_aura.h" 5 #include "chrome/browser/ui/views/frame/browser_frame_aura.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/themes/theme_service.h" 8 #include "chrome/browser/themes/theme_service.h"
9 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.h" 9 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.h"
10 #include "chrome/browser/ui/views/frame/browser_view.h" 10 #include "chrome/browser/ui/views/frame/browser_view.h"
11 #include "grit/theme_resources_standard.h" 11 #include "grit/theme_resources_standard.h"
12 #include "third_party/skia/include/core/SkBitmap.h" 12 #include "third_party/skia/include/core/SkBitmap.h"
13 #include "third_party/skia/include/core/SkCanvas.h" 13 #include "third_party/skia/include/core/SkCanvas.h"
14 #include "third_party/skia/include/core/SkColor.h" 14 #include "third_party/skia/include/core/SkColor.h"
15 #include "ui/aura/aura_switches.h" 15 #include "ui/aura/aura_switches.h"
16 #include "ui/aura/window.h"
16 #include "ui/base/resource/resource_bundle.h" 17 #include "ui/base/resource/resource_bundle.h"
17 #include "ui/base/theme_provider.h" 18 #include "ui/base/theme_provider.h"
18 #include "ui/gfx/canvas.h" 19 #include "ui/gfx/canvas.h"
19 #include "ui/gfx/compositor/layer.h" 20 #include "ui/gfx/compositor/layer.h"
20 #include "ui/gfx/font.h" 21 #include "ui/gfx/font.h"
21 #include "views/background.h" 22 #include "views/background.h"
22 23
23 namespace { 24 namespace {
24 25
25 // The content left/right images have a shadow built into them. 26 // The content left/right images have a shadow built into them.
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 : views::NativeWidgetAura(browser_frame), 163 : views::NativeWidgetAura(browser_frame),
163 browser_view_(browser_view), 164 browser_view_(browser_view),
164 browser_frame_(browser_frame) { 165 browser_frame_(browser_frame) {
165 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraWindows)) { 166 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraWindows)) {
166 // Aura paints layers behind this view, so this must be a layer also. 167 // Aura paints layers behind this view, so this must be a layer also.
167 // TODO: see if we can avoid this, layers are expensive. 168 // TODO: see if we can avoid this, layers are expensive.
168 browser_view_->SetPaintToLayer(true); 169 browser_view_->SetPaintToLayer(true);
169 browser_view_->layer()->SetFillsBoundsOpaquely(false); 170 browser_view_->layer()->SetFillsBoundsOpaquely(false);
170 // Background only needed for Aura-style windows. 171 // Background only needed for Aura-style windows.
171 browser_view_->set_background(new ToolbarBackground(browser_view)); 172 browser_view_->set_background(new ToolbarBackground(browser_view));
173 } else {
174 GetNativeWindow()->SetShadowVisible(true);
Daniel Erat 2011/11/15 01:05:04 Oshima recommended setting a new property for this
172 } 175 }
173 } 176 }
174 177
175 BrowserFrameAura::~BrowserFrameAura() { 178 BrowserFrameAura::~BrowserFrameAura() {
176 } 179 }
177 180
178 /////////////////////////////////////////////////////////////////////////////// 181 ///////////////////////////////////////////////////////////////////////////////
179 // BrowserFrameAura, views::NativeWidgetAura overrides: 182 // BrowserFrameAura, views::NativeWidgetAura overrides:
180 183
181 //////////////////////////////////////////////////////////////////////////////// 184 ////////////////////////////////////////////////////////////////////////////////
(...skipping 25 matching lines...) Expand all
207 210
208 //////////////////////////////////////////////////////////////////////////////// 211 ////////////////////////////////////////////////////////////////////////////////
209 // NativeBrowserFrame, public: 212 // NativeBrowserFrame, public:
210 213
211 // static 214 // static
212 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( 215 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame(
213 BrowserFrame* browser_frame, 216 BrowserFrame* browser_frame,
214 BrowserView* browser_view) { 217 BrowserView* browser_view) {
215 return new BrowserFrameAura(browser_frame, browser_view); 218 return new BrowserFrameAura(browser_frame, browser_view);
216 } 219 }
OLDNEW
« no previous file with comments | « no previous file | ui/aura/aura.gyp » ('j') | ui/aura/shadow.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698