diff options
Diffstat (limited to 'athena/main')
-rw-r--r-- | athena/main/DEPS | 2 | ||||
-rw-r--r-- | athena/main/athena_main.cc | 18 | ||||
-rw-r--r-- | athena/main/placeholder.cc | 3 |
3 files changed, 19 insertions, 4 deletions
diff --git a/athena/main/DEPS b/athena/main/DEPS index 09da049..f8729fc 100644 --- a/athena/main/DEPS +++ b/athena/main/DEPS @@ -1,10 +1,12 @@ include_rules = [ "+apps/shell/app", "+apps/shell/browser", + "+athena/home/public", "+athena/screen/public", "+athena/wm/public", "+content/public/app", "+ui/aura", + "+ui/wm/core", ] # TODO(oshima): Remove this. diff --git a/athena/main/athena_main.cc b/athena/main/athena_main.cc index 8e8cc63..8c6e7ab 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); }; diff --git a/athena/main/placeholder.cc b/athena/main/placeholder.cc index 0b0d359..eb5c3f6 100644 --- a/athena/main/placeholder.cc +++ b/athena/main/placeholder.cc @@ -16,6 +16,7 @@ #include "ui/views/widget/widget.h" void CreateTestWindows() { + const int kAppWindowBackgroundColor = 0xFFDDDDDD; views::Widget* test_app_widget = new views::Widget; // Athena doesn't have frame yet. views::Widget::InitParams params( @@ -25,7 +26,7 @@ void CreateTestWindows() { views::Label* label = new views::Label; label->SetText(base::ASCIIToUTF16("AppWindow")); label->set_background( - views::Background::CreateSolidBackground(SK_ColorWHITE)); + views::Background::CreateSolidBackground(kAppWindowBackgroundColor)); test_app_widget->SetContentsView(label); test_app_widget->Show(); } |