summaryrefslogtreecommitdiffstats
path: root/athena/main
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-24 01:58:26 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-24 01:58:26 +0000
commit3397a04e2e97f9ea9ea5d9b5509ebcdc2d607592 (patch)
treef683220566a6b04577e4dbc89af0363a8897841d /athena/main
parentf7280b45e30ff2ced5b52947db5a57ad5b32a552 (diff)
downloadchromium_src-3397a04e2e97f9ea9ea5d9b5509ebcdc2d607592.zip
chromium_src-3397a04e2e97f9ea9ea5d9b5509ebcdc2d607592.tar.gz
chromium_src-3397a04e2e97f9ea9ea5d9b5509ebcdc2d607592.tar.bz2
Add initial home card impl.
BUG=362288 Review URL: https://codereview.chromium.org/287253003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272681 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'athena/main')
-rw-r--r--athena/main/DEPS2
-rw-r--r--athena/main/athena_main.cc18
-rw-r--r--athena/main/placeholder.cc3
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();
}