Index: athena/main/athena_main.cc |
diff --git a/athena/main/athena_main.cc b/athena/main/athena_main.cc |
index 8e8cc63a7b8a55ec1a6ee3781f9245e26a25202b..8c6e7aba36b2683b498e6639b33d4acc81cf5c66 100644 |
--- a/athena/main/athena_main.cc |
+++ b/athena/main/athena_main.cc |
@@ -5,11 +5,14 @@ |
#include "apps/shell/app/shell_main_delegate.h" |
#include "apps/shell/browser/shell_browser_main_delegate.h" |
#include "apps/shell/browser/shell_desktop_controller.h" |
+#include "athena/home/public/home_card.h" |
#include "athena/main/placeholder.h" |
#include "athena/screen/public/screen_manager.h" |
#include "athena/wm/public/window_manager.h" |
+#include "base/memory/scoped_ptr.h" |
#include "content/public/app/content_main.h" |
#include "ui/aura/window_tree_host.h" |
+#include "ui/wm/core/visibility_controller.h" |
class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate { |
public: |
@@ -18,20 +21,29 @@ class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate { |
// apps::ShellBrowserMainDelegate: |
virtual void Start(content::BrowserContext* context) OVERRIDE { |
- athena::ScreenManager::Create(apps::ShellDesktopController::instance() |
- ->GetWindowTreeHost() |
- ->window()); |
+ aura::Window* root_window = |
+ apps::ShellDesktopController::instance()->GetWindowTreeHost()->window(); |
+ visibility_controller_.reset(new ::wm::VisibilityController); |
+ aura::client::SetVisibilityClient(root_window, |
+ visibility_controller_.get()); |
+ |
+ athena::ScreenManager::Create(root_window); |
athena::WindowManager::Create(); |
+ athena::HomeCard::Create(); |
SetupBackgroundImage(); |
CreateTestWindows(); |
} |
virtual void Shutdown() OVERRIDE { |
+ athena::HomeCard::Shutdown(); |
athena::WindowManager::Shutdown(); |
athena::ScreenManager::Shutdown(); |
+ visibility_controller_.reset(); |
} |
+ scoped_ptr< ::wm::VisibilityController> visibility_controller_; |
+ |
private: |
DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate); |
}; |