Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: athena/screen/screen_manager_impl.cc

Issue 287253003: Add initial home card impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « athena/screen/public/screen_manager.h ('k') | athena/wm/window_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/screen/screen_manager_impl.cc
diff --git a/athena/screen/screen_manager_impl.cc b/athena/screen/screen_manager_impl.cc
index 1e8223832a50ad3b9cc8b23a170c466395645394..ca3101a7698c623e77d6dd3c102d0184e51e6924 100644
--- a/athena/screen/screen_manager_impl.cc
+++ b/athena/screen/screen_manager_impl.cc
@@ -73,7 +73,8 @@ class AthenaWindowTreeClient : public aura::client::WindowTreeClient {
DISALLOW_COPY_AND_ASSIGN(AthenaWindowTreeClient);
};
-aura::Window* CreateContainer(aura::Window* parent, const std::string& name) {
+aura::Window* CreateContainerInternal(aura::Window* parent,
+ const std::string& name) {
aura::Window* container = new aura::Window(NULL);
container->Init(aura::WINDOW_LAYER_NOT_DRAWN);
container->SetName(name);
@@ -90,15 +91,16 @@ class ScreenManagerImpl : public ScreenManager {
void Init();
private:
- // Screenmanager:
- virtual aura::Window* GetContainerWindow() OVERRIDE { return container_; }
+ // ScreenManager:
+ virtual aura::Window* CreateDefaultContainer(
+ const std::string& name) OVERRIDE;
+ virtual aura::Window* CreateContainer(const std::string& name) OVERRIDE;
virtual aura::Window* GetContext() OVERRIDE { return root_window_; }
virtual void SetBackgroundImage(const gfx::ImageSkia& image) OVERRIDE;
aura::Window* root_window_;
- // A container used for apps/web windows.
- aura::Window* container_;
aura::Window* background_window_;
+
scoped_ptr<BackgroundController> background_controller_;
scoped_ptr<aura::client::WindowTreeClient> window_tree_client_;
@@ -107,14 +109,23 @@ class ScreenManagerImpl : public ScreenManager {
void ScreenManagerImpl::Init() {
root_window_->SetLayoutManager(new FillLayoutManager(root_window_));
- background_window_ = CreateContainer(root_window_, "AthenaBackground");
+ background_window_ =
+ CreateContainerInternal(root_window_, "AthenaBackground");
background_window_->SetLayoutManager(
new FillLayoutManager(background_window_));
background_controller_.reset(new BackgroundController(background_window_));
- container_ = CreateContainer(root_window_, "AthenaContainer");
+}
- window_tree_client_.reset(new AthenaWindowTreeClient(container_));
+aura::Window* ScreenManagerImpl::CreateDefaultContainer(
+ const std::string& name) {
+ aura::Window* container = CreateContainerInternal(root_window_, name);
+ window_tree_client_.reset(new AthenaWindowTreeClient(container));
aura::client::SetWindowTreeClient(root_window_, window_tree_client_.get());
+ return container;
+}
+
+aura::Window* ScreenManagerImpl::CreateContainer(const std::string& name) {
+ return CreateContainerInternal(root_window_, name);
}
void ScreenManagerImpl::SetBackgroundImage(const gfx::ImageSkia& image) {
« no previous file with comments | « athena/screen/public/screen_manager.h ('k') | athena/wm/window_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698