| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/screen/screen_manager_impl.h" | 5 #include "athena/screen/screen_manager_impl.h" |
| 6 | 6 |
| 7 #include "athena/input/public/accelerator_manager.h" | 7 #include "athena/input/public/accelerator_manager.h" |
| 8 #include "athena/screen/modal_window_controller.h" | 8 #include "athena/screen/modal_window_controller.h" |
| 9 #include "athena/screen/screen_accelerator_handler.h" | 9 #include "athena/screen/screen_accelerator_handler.h" |
| 10 #include "athena/util/container_priorities.h" | 10 #include "athena/util/container_priorities.h" |
| 11 #include "athena/util/fill_layout_manager.h" | |
| 12 #include "base/logging.h" | 11 #include "base/logging.h" |
| 13 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 14 #include "ui/aura/client/aura_constants.h" | 13 #include "ui/aura/client/aura_constants.h" |
| 15 #include "ui/aura/client/screen_position_client.h" | 14 #include "ui/aura/client/screen_position_client.h" |
| 16 #include "ui/aura/test/test_screen.h" | 15 #include "ui/aura/test/test_screen.h" |
| 17 #include "ui/aura/window.h" | 16 #include "ui/aura/window.h" |
| 18 #include "ui/aura/window_property.h" | 17 #include "ui/aura/window_property.h" |
| 19 #include "ui/aura/window_targeter.h" | 18 #include "ui/aura/window_targeter.h" |
| 20 #include "ui/aura/window_tree_host.h" | 19 #include "ui/aura/window_tree_host.h" |
| 21 #include "ui/gfx/display.h" | 20 #include "ui/gfx/display.h" |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 252 |
| 254 void ScreenManagerImpl::Init() { | 253 void ScreenManagerImpl::Init() { |
| 255 wm::FocusController* focus_controller = | 254 wm::FocusController* focus_controller = |
| 256 new wm::FocusController(new AthenaFocusRules()); | 255 new wm::FocusController(new AthenaFocusRules()); |
| 257 | 256 |
| 258 aura::client::SetFocusClient(root_window_, focus_controller); | 257 aura::client::SetFocusClient(root_window_, focus_controller); |
| 259 root_window_->AddPreTargetHandler(focus_controller); | 258 root_window_->AddPreTargetHandler(focus_controller); |
| 260 aura::client::SetActivationClient(root_window_, focus_controller); | 259 aura::client::SetActivationClient(root_window_, focus_controller); |
| 261 focus_client_.reset(focus_controller); | 260 focus_client_.reset(focus_controller); |
| 262 | 261 |
| 263 root_window_->SetLayoutManager(new FillLayoutManager(root_window_)); | |
| 264 capture_client_.reset(new ::wm::ScopedCaptureClient(root_window_)); | 262 capture_client_.reset(new ::wm::ScopedCaptureClient(root_window_)); |
| 265 accelerator_handler_.reset(new ScreenAcceleratorHandler()); | 263 accelerator_handler_.reset(new ScreenAcceleratorHandler()); |
| 266 | 264 |
| 267 aura::client::SetWindowTreeClient(root_window_, this); | 265 aura::client::SetWindowTreeClient(root_window_, this); |
| 268 | 266 |
| 269 screen_position_client_.reset(new AthenaScreenPositionClient()); | 267 screen_position_client_.reset(new AthenaScreenPositionClient()); |
| 270 aura::client::SetScreenPositionClient(root_window_, | 268 aura::client::SetScreenPositionClient(root_window_, |
| 271 screen_position_client_.get()); | 269 screen_position_client_.get()); |
| 272 root_window_->SetEventTargeter( | 270 root_window_->SetEventTargeter( |
| 273 make_scoped_ptr(new AthenaWindowTargeter(root_window_))); | 271 make_scoped_ptr(new AthenaWindowTargeter(root_window_))); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 } | 412 } |
| 415 | 413 |
| 416 // static | 414 // static |
| 417 void ScreenManager::Shutdown() { | 415 void ScreenManager::Shutdown() { |
| 418 DCHECK(instance); | 416 DCHECK(instance); |
| 419 delete instance; | 417 delete instance; |
| 420 DCHECK(!instance); | 418 DCHECK(!instance); |
| 421 } | 419 } |
| 422 | 420 |
| 423 } // namespace athena | 421 } // namespace athena |
| OLD | NEW |