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

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

Issue 8602003: Revert 110637 - Add ShellAcceleratorController that manages global keyboard accelerators. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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/shell_accelerator_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/desktop.h" 12 #include "ui/aura/desktop.h"
13 #include "ui/aura/window.h" 13 #include "ui/aura/window.h"
14 #include "ui/aura/window_types.h" 14 #include "ui/aura/window_types.h"
15 #include "ui/aura_shell/default_container_event_filter.h" 15 #include "ui/aura_shell/default_container_event_filter.h"
16 #include "ui/aura_shell/default_container_layout_manager.h" 16 #include "ui/aura_shell/default_container_layout_manager.h"
17 #include "ui/aura_shell/desktop_event_filter.h" 17 #include "ui/aura_shell/desktop_event_filter.h"
18 #include "ui/aura_shell/desktop_layout_manager.h" 18 #include "ui/aura_shell/desktop_layout_manager.h"
19 #include "ui/aura_shell/drag_drop_controller.h" 19 #include "ui/aura_shell/drag_drop_controller.h"
20 #include "ui/aura_shell/launcher/launcher.h" 20 #include "ui/aura_shell/launcher/launcher.h"
21 #include "ui/aura_shell/modal_container_layout_manager.h" 21 #include "ui/aura_shell/modal_container_layout_manager.h"
22 #include "ui/aura_shell/shelf_layout_controller.h" 22 #include "ui/aura_shell/shelf_layout_controller.h"
23 #include "ui/aura_shell/shell_accelerator_controller.h"
24 #include "ui/aura_shell/shell_delegate.h" 23 #include "ui/aura_shell/shell_delegate.h"
25 #include "ui/aura_shell/shell_factory.h" 24 #include "ui/aura_shell/shell_factory.h"
26 #include "ui/aura_shell/shell_window_ids.h" 25 #include "ui/aura_shell/shell_window_ids.h"
27 #include "ui/aura_shell/stacking_controller.h" 26 #include "ui/aura_shell/stacking_controller.h"
28 #include "ui/aura_shell/toplevel_layout_manager.h" 27 #include "ui/aura_shell/toplevel_layout_manager.h"
29 #include "ui/aura_shell/toplevel_window_event_filter.h" 28 #include "ui/aura_shell/toplevel_window_event_filter.h"
30 #include "ui/aura_shell/workspace_controller.h" 29 #include "ui/aura_shell/workspace_controller.h"
31 #include "ui/gfx/compositor/layer.h" 30 #include "ui/gfx/compositor/layer.h"
32 #include "ui/gfx/compositor/layer_animator.h" 31 #include "ui/gfx/compositor/layer_animator.h"
33 #include "views/widget/native_widget_aura.h" 32 #include "views/widget/native_widget_aura.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } // namespace 91 } // namespace
93 92
94 // static 93 // static
95 Shell* Shell::instance_ = NULL; 94 Shell* Shell::instance_ = NULL;
96 95
97 //////////////////////////////////////////////////////////////////////////////// 96 ////////////////////////////////////////////////////////////////////////////////
98 // Shell, public: 97 // Shell, public:
99 98
100 Shell::Shell(ShellDelegate* delegate) 99 Shell::Shell(ShellDelegate* delegate)
101 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), 100 : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
102 accelerator_controller_(new ShellAcceleratorController),
103 delegate_(delegate) { 101 delegate_(delegate) {
104 aura::Desktop::GetInstance()->SetEventFilter( 102 aura::Desktop::GetInstance()->SetEventFilter(
105 new internal::DesktopEventFilter); 103 new internal::DesktopEventFilter);
106 aura::Desktop::GetInstance()->SetStackingClient( 104 aura::Desktop::GetInstance()->SetStackingClient(
107 new internal::StackingController); 105 new internal::StackingController);
108 } 106 }
109 107
110 Shell::~Shell() { 108 Shell::~Shell() {
111 // Drag drop controller needs a valid shell instance. We destroy it first. 109 // Drag drop controller needs a valid shell instance. We destroy it first.
112 drag_drop_controller_.reset(); 110 drag_drop_controller_.reset();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 new internal::WorkspaceController(default_container)); 228 new internal::WorkspaceController(default_container));
231 workspace_controller_->SetLauncherModel(launcher_->model()); 229 workspace_controller_->SetLauncherModel(launcher_->model());
232 default_container->SetEventFilter( 230 default_container->SetEventFilter(
233 new internal::DefaultContainerEventFilter(default_container)); 231 new internal::DefaultContainerEventFilter(default_container));
234 default_container->SetLayoutManager( 232 default_container->SetLayoutManager(
235 new internal::DefaultContainerLayoutManager( 233 new internal::DefaultContainerLayoutManager(
236 workspace_controller_->workspace_manager())); 234 workspace_controller_->workspace_manager()));
237 } 235 }
238 236
239 } // namespace aura_shell 237 } // namespace aura_shell
OLDNEW
« no previous file with comments | « ui/aura_shell/shell.h ('k') | ui/aura_shell/shell_accelerator_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698