OLD | NEW |
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 "ui/aura_shell/toplevel_layout_manager.h" | 5 #include "ui/aura_shell/toplevel_layout_manager.h" |
6 | 6 |
7 #include "ui/aura/client/aura_constants.h" | 7 #include "ui/aura/client/aura_constants.h" |
8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
9 #include "ui/aura_shell/property_util.h" | 9 #include "ui/aura_shell/property_util.h" |
10 #include "ui/aura_shell/shelf_layout_controller.h" | 10 #include "ui/aura_shell/shelf_layout_controller.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 void ToplevelLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child, | 44 void ToplevelLayoutManager::OnChildWindowVisibilityChanged(aura::Window* child, |
45 bool visibile) { | 45 bool visibile) { |
46 UpdateShelfVisibility(); | 46 UpdateShelfVisibility(); |
47 } | 47 } |
48 | 48 |
49 void ToplevelLayoutManager::SetChildBounds(aura::Window* child, | 49 void ToplevelLayoutManager::SetChildBounds(aura::Window* child, |
50 const gfx::Rect& requested_bounds) { | 50 const gfx::Rect& requested_bounds) { |
51 SetChildBoundsDirect(child, requested_bounds); | 51 SetChildBoundsDirect(child, requested_bounds); |
52 } | 52 } |
53 | 53 |
54 void ToplevelLayoutManager::OnPropertyChanged(aura::Window* window, | 54 void ToplevelLayoutManager::OnWindowPropertyChanged(aura::Window* window, |
55 const char* name, | 55 const char* name, |
56 void* old) { | 56 void* old) { |
57 if (name == aura::kShowStateKey) | 57 if (name == aura::kShowStateKey) |
58 WindowStateChanged(window); | 58 WindowStateChanged(window); |
59 } | 59 } |
60 | 60 |
61 void ToplevelLayoutManager::WindowStateChanged(aura::Window* window) { | 61 void ToplevelLayoutManager::WindowStateChanged(aura::Window* window) { |
62 switch (window->GetIntProperty(aura::kShowStateKey)) { | 62 switch (window->GetIntProperty(aura::kShowStateKey)) { |
63 case ui::SHOW_STATE_NORMAL: { | 63 case ui::SHOW_STATE_NORMAL: { |
64 const gfx::Rect* restore = GetRestoreBounds(window); | 64 const gfx::Rect* restore = GetRestoreBounds(window); |
65 window->SetProperty(aura::kRestoreBoundsKey, NULL); | 65 window->SetProperty(aura::kRestoreBoundsKey, NULL); |
66 if (restore) | 66 if (restore) |
(...skipping 29 matching lines...) Expand all Loading... |
96 ui::SHOW_STATE_FULLSCREEN) { | 96 ui::SHOW_STATE_FULLSCREEN) { |
97 has_fullscreen_window = true; | 97 has_fullscreen_window = true; |
98 break; | 98 break; |
99 } | 99 } |
100 } | 100 } |
101 shelf_->SetVisible(!has_fullscreen_window); | 101 shelf_->SetVisible(!has_fullscreen_window); |
102 } | 102 } |
103 | 103 |
104 } // namespace internal | 104 } // namespace internal |
105 } // namespace aura_shell | 105 } // namespace aura_shell |
OLD | NEW |