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

Side by Side Diff: athena/wm/window_manager_impl.cc

Issue 349353002: athena: Show network and battery status in the UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "athena/wm/public/window_manager.h" 5 #include "athena/wm/public/window_manager.h"
6 6
7 #include "athena/screen/public/screen_manager.h" 7 #include "athena/screen/public/screen_manager.h"
8 #include "athena/wm/debug/debug_window.h"
8 #include "athena/wm/window_overview_mode.h" 9 #include "athena/wm/window_overview_mode.h"
9 #include "base/logging.h" 10 #include "base/logging.h"
10 #include "ui/aura/layout_manager.h" 11 #include "ui/aura/layout_manager.h"
11 #include "ui/aura/window.h" 12 #include "ui/aura/window.h"
12 #include "ui/wm/public/window_types.h" 13 #include "ui/wm/public/window_types.h"
13 14
14 namespace athena { 15 namespace athena {
15 namespace { 16 namespace {
16 17
17 class WindowManagerImpl : public WindowManager, 18 class WindowManagerImpl : public WindowManager,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 DISALLOW_COPY_AND_ASSIGN(TempEventHandler); 100 DISALLOW_COPY_AND_ASSIGN(TempEventHandler);
100 }; 101 };
101 102
102 WindowManagerImpl::WindowManagerImpl() 103 WindowManagerImpl::WindowManagerImpl()
103 : container_(ScreenManager::Get()->CreateDefaultContainer("MainContainer")), 104 : container_(ScreenManager::Get()->CreateDefaultContainer("MainContainer")),
104 temp_handler_(new TempEventHandler()) { 105 temp_handler_(new TempEventHandler()) {
105 container_->SetLayoutManager(new AthenaContainerLayoutManager); 106 container_->SetLayoutManager(new AthenaContainerLayoutManager);
106 container_->AddObserver(this); 107 container_->AddObserver(this);
107 container_->AddPreTargetHandler(temp_handler_.get()); 108 container_->AddPreTargetHandler(temp_handler_.get());
108 instance = this; 109 instance = this;
110
111 CreateDebugWindow();
109 } 112 }
110 113
111 WindowManagerImpl::~WindowManagerImpl() { 114 WindowManagerImpl::~WindowManagerImpl() {
112 if (container_) { 115 if (container_) {
113 container_->RemovePreTargetHandler(temp_handler_.get()); 116 container_->RemovePreTargetHandler(temp_handler_.get());
114 container_->RemoveObserver(this); 117 container_->RemoveObserver(this);
115 } 118 }
116 container_.reset(); 119 container_.reset();
117 instance = NULL; 120 instance = NULL;
118 } 121 }
(...skipping 23 matching lines...) Expand all
142 } 145 }
143 146
144 // static 147 // static
145 void WindowManager::Shutdown() { 148 void WindowManager::Shutdown() {
146 DCHECK(instance); 149 DCHECK(instance);
147 delete instance; 150 delete instance;
148 DCHECK(!instance); 151 DCHECK(!instance);
149 } 152 }
150 153
151 } // namespace athena 154 } // namespace athena
OLDNEW
« athena/wm/debug/debug_window.cc ('K') | « athena/wm/debug/debug_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698