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

Side by Side Diff: ui/aura_shell/shell.cc

Issue 8894018: Move the concept of Activation to the Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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
« no previous file with comments | « ui/aura_shell/shell.h ('k') | ui/aura_shell/stacking_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/aura_shell/shell.h" 5 #include "ui/aura_shell/shell.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "ui/aura/aura_switches.h" 9 #include "ui/aura/aura_switches.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
11 #include "ui/aura/client/drag_drop_client.h" 11 #include "ui/aura/client/drag_drop_client.h"
12 #include "ui/aura/root_window.h" 12 #include "ui/aura/root_window.h"
13 #include "ui/aura/layout_manager.h" 13 #include "ui/aura/layout_manager.h"
14 #include "ui/aura/window.h" 14 #include "ui/aura/window.h"
15 #include "ui/aura/window_types.h" 15 #include "ui/aura/window_types.h"
16 #include "ui/aura_shell/activation_controller.h"
16 #include "ui/aura_shell/app_list.h" 17 #include "ui/aura_shell/app_list.h"
17 #include "ui/aura_shell/default_container_event_filter.h" 18 #include "ui/aura_shell/default_container_event_filter.h"
18 #include "ui/aura_shell/default_container_layout_manager.h" 19 #include "ui/aura_shell/default_container_layout_manager.h"
19 #include "ui/aura_shell/root_window_event_filter.h" 20 #include "ui/aura_shell/root_window_event_filter.h"
20 #include "ui/aura_shell/root_window_layout_manager.h" 21 #include "ui/aura_shell/root_window_layout_manager.h"
21 #include "ui/aura_shell/drag_drop_controller.h" 22 #include "ui/aura_shell/drag_drop_controller.h"
22 #include "ui/aura_shell/launcher/launcher.h" 23 #include "ui/aura_shell/launcher/launcher.h"
23 #include "ui/aura_shell/modal_container_layout_manager.h" 24 #include "ui/aura_shell/modal_container_layout_manager.h"
24 #include "ui/aura_shell/shadow_controller.h" 25 #include "ui/aura_shell/shadow_controller.h"
25 #include "ui/aura_shell/shelf_layout_manager.h" 26 #include "ui/aura_shell/shelf_layout_manager.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // static 172 // static
172 void Shell::DeleteInstance() { 173 void Shell::DeleteInstance() {
173 delete instance_; 174 delete instance_;
174 instance_ = NULL; 175 instance_ = NULL;
175 } 176 }
176 177
177 void Shell::Init() { 178 void Shell::Init() {
178 aura::RootWindow* root_window = aura::RootWindow::GetInstance(); 179 aura::RootWindow* root_window = aura::RootWindow::GetInstance();
179 root_window->SetCursor(aura::kCursorPointer); 180 root_window->SetCursor(aura::kCursorPointer);
180 181
182 activation_controller_.reset(new internal::ActivationController);
183
181 aura::Window::Windows containers; 184 aura::Window::Windows containers;
182 CreateSpecialContainers(&containers); 185 CreateSpecialContainers(&containers);
183 aura::Window::Windows::const_iterator i; 186 aura::Window::Windows::const_iterator i;
184 for (i = containers.begin(); i != containers.end(); ++i) { 187 for (i = containers.begin(); i != containers.end(); ++i) {
185 (*i)->Init(ui::Layer::LAYER_HAS_NO_TEXTURE); 188 (*i)->Init(ui::Layer::LAYER_HAS_NO_TEXTURE);
186 root_window->AddChild(*i); 189 root_window->AddChild(*i);
187 (*i)->Show(); 190 (*i)->Show();
188 } 191 }
189 192
190 internal::StackingController* stacking_controller = 193 internal::StackingController* stacking_controller =
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 new internal::WorkspaceController(default_container)); 296 new internal::WorkspaceController(default_container));
294 workspace_controller_->SetLauncherModel(launcher_->model()); 297 workspace_controller_->SetLauncherModel(launcher_->model());
295 default_container->SetEventFilter( 298 default_container->SetEventFilter(
296 new internal::DefaultContainerEventFilter(default_container)); 299 new internal::DefaultContainerEventFilter(default_container));
297 default_container->SetLayoutManager( 300 default_container->SetLayoutManager(
298 new internal::DefaultContainerLayoutManager( 301 new internal::DefaultContainerLayoutManager(
299 workspace_controller_->workspace_manager())); 302 workspace_controller_->workspace_manager()));
300 } 303 }
301 304
302 } // namespace aura_shell 305 } // namespace aura_shell
OLDNEW
« no previous file with comments | « ui/aura_shell/shell.h ('k') | ui/aura_shell/stacking_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698