OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/views/corewm/shadow_controller.h" | 5 #include "ui/views/corewm/shadow_controller.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 using std::make_pair; | 23 using std::make_pair; |
24 | 24 |
25 namespace views { | 25 namespace views { |
26 namespace corewm { | 26 namespace corewm { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 ShadowType GetShadowTypeFromWindow(aura::Window* window) { | 30 ShadowType GetShadowTypeFromWindow(aura::Window* window) { |
31 switch (window->type()) { | 31 switch (window->type()) { |
32 case aura::client::WINDOW_TYPE_NORMAL: | 32 case ui::wm::WINDOW_TYPE_NORMAL: |
33 case aura::client::WINDOW_TYPE_PANEL: | 33 case ui::wm::WINDOW_TYPE_PANEL: |
34 case aura::client::WINDOW_TYPE_MENU: | 34 case ui::wm::WINDOW_TYPE_MENU: |
35 case aura::client::WINDOW_TYPE_TOOLTIP: | 35 case ui::wm::WINDOW_TYPE_TOOLTIP: |
36 return SHADOW_TYPE_RECTANGULAR; | 36 return SHADOW_TYPE_RECTANGULAR; |
37 default: | 37 default: |
38 break; | 38 break; |
39 } | 39 } |
40 return SHADOW_TYPE_NONE; | 40 return SHADOW_TYPE_NONE; |
41 } | 41 } |
42 | 42 |
43 bool ShouldUseSmallShadowForWindow(aura::Window* window) { | 43 bool ShouldUseSmallShadowForWindow(aura::Window* window) { |
44 switch (window->type()) { | 44 switch (window->type()) { |
45 case aura::client::WINDOW_TYPE_MENU: | 45 case ui::wm::WINDOW_TYPE_MENU: |
46 case aura::client::WINDOW_TYPE_TOOLTIP: | 46 case ui::wm::WINDOW_TYPE_TOOLTIP: |
47 return true; | 47 return true; |
48 default: | 48 default: |
49 break; | 49 break; |
50 } | 50 } |
51 return false; | 51 return false; |
52 } | 52 } |
53 | 53 |
54 // Returns the shadow style to be applied to |losing_active| when it is losing | 54 // Returns the shadow style to be applied to |losing_active| when it is losing |
55 // active to |gaining_active|. |gaining_active| may be of a type that hides when | 55 // active to |gaining_active|. |gaining_active| may be of a type that hides when |
56 // inactive, and as such we do not want to render |losing_active| as inactive. | 56 // inactive, and as such we do not want to render |losing_active| as inactive. |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 } | 264 } |
265 | 265 |
266 // ShadowController::TestApi --------------------------------------------------- | 266 // ShadowController::TestApi --------------------------------------------------- |
267 | 267 |
268 Shadow* ShadowController::TestApi::GetShadowForWindow(aura::Window* window) { | 268 Shadow* ShadowController::TestApi::GetShadowForWindow(aura::Window* window) { |
269 return controller_->impl_->GetShadowForWindow(window); | 269 return controller_->impl_->GetShadowForWindow(window); |
270 } | 270 } |
271 | 271 |
272 } // namespace corewm | 272 } // namespace corewm |
273 } // namespace views | 273 } // namespace views |
OLD | NEW |