OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "athena/main/athena_launcher.h" |
| 6 |
| 7 #include "athena/home/public/home_card.h" |
| 8 #include "athena/main/placeholder.h" |
| 9 #include "athena/screen/public/screen_manager.h" |
| 10 #include "athena/wm/public/window_manager.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "ui/aura/window_property.h" |
| 13 #include "ui/wm/core/visibility_controller.h" |
| 14 |
| 15 namespace athena { |
| 16 struct RootWindowState; |
| 17 } |
| 18 |
| 19 DECLARE_WINDOW_PROPERTY_TYPE(athena::RootWindowState*); |
| 20 |
| 21 namespace athena { |
| 22 |
| 23 // Athena's per root window state. |
| 24 struct RootWindowState { |
| 25 scoped_ptr< ::wm::VisibilityController> visibility_client; |
| 26 }; |
| 27 |
| 28 DEFINE_OWNED_WINDOW_PROPERTY_KEY(athena::RootWindowState, |
| 29 kRootWindowStateKey, |
| 30 NULL); |
| 31 |
| 32 void StartAthena(aura::Window* root_window) { |
| 33 RootWindowState* root_window_state = new RootWindowState; |
| 34 root_window->SetProperty(kRootWindowStateKey, root_window_state); |
| 35 |
| 36 root_window_state->visibility_client.reset(new ::wm::VisibilityController); |
| 37 aura::client::SetVisibilityClient(root_window, |
| 38 root_window_state->visibility_client.get()); |
| 39 |
| 40 athena::ScreenManager::Create(root_window); |
| 41 athena::WindowManager::Create(); |
| 42 athena::HomeCard::Create(); |
| 43 |
| 44 SetupBackgroundImage(); |
| 45 } |
| 46 |
| 47 void ShutdownAthena() { |
| 48 athena::HomeCard::Shutdown(); |
| 49 athena::WindowManager::Shutdown(); |
| 50 athena::ScreenManager::Shutdown(); |
| 51 } |
| 52 |
| 53 } // namespace athena |
OLD | NEW |