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

Side by Side Diff: ash/wm/shadow_controller.cc

Issue 9035001: Move some more WM functionality down into ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 | « ash/wm/root_window_layout_manager.cc ('k') | ash/wm/shadow_controller_unittest.cc » ('j') | no next file with comments »
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 "ash/wm/shadow_controller.h" 5 #include "ash/wm/shadow_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/wm/shadow.h" 9 #include "ash/wm/shadow.h"
10 #include "ash/wm/shadow_types.h" 10 #include "ash/wm/shadow_types.h"
11 #include "ash/wm/window_properties.h"
11 #include "base/command_line.h" 12 #include "base/command_line.h"
12 #include "base/logging.h" 13 #include "base/logging.h"
13 #include "ui/aura/root_window.h" 14 #include "ui/aura/root_window.h"
14 #include "ui/aura/window.h" 15 #include "ui/aura/window.h"
15 #include "ui/aura_shell/aura_shell_switches.h" 16 #include "ui/aura_shell/aura_shell_switches.h"
16 #include "ui/aura_shell/window_properties.h"
17 17
18 using std::make_pair; 18 using std::make_pair;
19 19
20 namespace aura_shell { 20 namespace aura_shell {
21 namespace internal { 21 namespace internal {
22 22
23 namespace { 23 namespace {
24 24
25 ShadowType GetShadowTypeFromWindowType(aura::Window* window) { 25 ShadowType GetShadowTypeFromWindowType(aura::Window* window) {
26 switch (window->type()) { 26 switch (window->type()) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 window_shadows_.insert(make_pair(window, shadow)); 108 window_shadows_.insert(make_pair(window, shadow));
109 109
110 shadow->Init(); 110 shadow->Init();
111 shadow->SetContentBounds(gfx::Rect(window->bounds().size())); 111 shadow->SetContentBounds(gfx::Rect(window->bounds().size()));
112 shadow->layer()->SetVisible(ShouldShowShadowForWindow(window)); 112 shadow->layer()->SetVisible(ShouldShowShadowForWindow(window));
113 window->layer()->Add(shadow->layer()); 113 window->layer()->Add(shadow->layer());
114 } 114 }
115 115
116 } // namespace internal 116 } // namespace internal
117 } // namespace aura_shell 117 } // namespace aura_shell
OLDNEW
« no previous file with comments | « ash/wm/root_window_layout_manager.cc ('k') | ash/wm/shadow_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698