| 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 "ash/wm/window_util.h" | 5 #include "ash/wm/window_util.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/wm/activation_controller.h" | 8 #include "ash/wm/activation_controller.h" |
| 9 #include "ash/wm/window_properties.h" | 9 #include "ash/wm/window_properties.h" |
| 10 #include "ui/aura/client/activation_client.h" | 10 #include "ui/aura/client/activation_client.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 void RestoreWindow(aura::Window* window) { | 92 void RestoreWindow(aura::Window* window) { |
| 93 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); | 93 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void CenterWindow(aura::Window* window) { | 96 void CenterWindow(aura::Window* window) { |
| 97 const gfx::Display display = gfx::Screen::GetMonitorNearestWindow(window); | 97 const gfx::Display display = gfx::Screen::GetMonitorNearestWindow(window); |
| 98 gfx::Rect center = display.work_area().Center(window->bounds().size()); | 98 gfx::Rect center = display.work_area().Center(window->bounds().size()); |
| 99 window->SetBounds(center); | 99 window->SetBounds(center); |
| 100 } | 100 } |
| 101 | 101 |
| 102 internal::RootWindowController* GetRootWindowController( |
| 103 aura::RootWindow* root_window) { |
| 104 return root_window->GetProperty(internal::kRootWindowControllerKey); |
| 105 } |
| 106 |
| 102 } // namespace wm | 107 } // namespace wm |
| 103 } // namespace ash | 108 } // namespace ash |
| OLD | NEW |