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

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

Issue 8817016: Revert 113185 - [cros, Aura] Refresh status area widget bounds on StatusAreaView layout. (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/status_area_layout_manager.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/layout_manager.h"
14 #include "ui/aura/window.h" 13 #include "ui/aura/window.h"
15 #include "ui/aura/window_types.h" 14 #include "ui/aura/window_types.h"
16 #include "ui/aura_shell/app_list.h" 15 #include "ui/aura_shell/app_list.h"
17 #include "ui/aura_shell/default_container_event_filter.h" 16 #include "ui/aura_shell/default_container_event_filter.h"
18 #include "ui/aura_shell/default_container_layout_manager.h" 17 #include "ui/aura_shell/default_container_layout_manager.h"
19 #include "ui/aura_shell/desktop_event_filter.h" 18 #include "ui/aura_shell/desktop_event_filter.h"
20 #include "ui/aura_shell/desktop_layout_manager.h" 19 #include "ui/aura_shell/desktop_layout_manager.h"
21 #include "ui/aura_shell/drag_drop_controller.h" 20 #include "ui/aura_shell/drag_drop_controller.h"
22 #include "ui/aura_shell/launcher/launcher.h" 21 #include "ui/aura_shell/launcher/launcher.h"
23 #include "ui/aura_shell/modal_container_layout_manager.h" 22 #include "ui/aura_shell/modal_container_layout_manager.h"
24 #include "ui/aura_shell/shadow_controller.h" 23 #include "ui/aura_shell/shadow_controller.h"
25 #include "ui/aura_shell/shelf_layout_manager.h" 24 #include "ui/aura_shell/shelf_layout_controller.h"
26 #include "ui/aura_shell/shell_accelerator_controller.h" 25 #include "ui/aura_shell/shell_accelerator_controller.h"
27 #include "ui/aura_shell/shell_accelerator_filter.h" 26 #include "ui/aura_shell/shell_accelerator_filter.h"
28 #include "ui/aura_shell/shell_delegate.h" 27 #include "ui/aura_shell/shell_delegate.h"
29 #include "ui/aura_shell/shell_factory.h" 28 #include "ui/aura_shell/shell_factory.h"
30 #include "ui/aura_shell/shell_tooltip_manager.h" 29 #include "ui/aura_shell/shell_tooltip_manager.h"
31 #include "ui/aura_shell/shell_window_ids.h" 30 #include "ui/aura_shell/shell_window_ids.h"
32 #include "ui/aura_shell/stacking_controller.h" 31 #include "ui/aura_shell/stacking_controller.h"
33 #include "ui/aura_shell/status_area_layout_manager.h"
34 #include "ui/aura_shell/toplevel_layout_manager.h" 32 #include "ui/aura_shell/toplevel_layout_manager.h"
35 #include "ui/aura_shell/toplevel_window_event_filter.h" 33 #include "ui/aura_shell/toplevel_window_event_filter.h"
36 #include "ui/aura_shell/workspace_controller.h" 34 #include "ui/aura_shell/workspace_controller.h"
37 #include "ui/gfx/compositor/layer.h" 35 #include "ui/gfx/compositor/layer.h"
38 #include "ui/gfx/compositor/layer_animator.h" 36 #include "ui/gfx/compositor/layer_animator.h"
39 #include "ui/views/widget/native_widget_aura.h" 37 #include "ui/views/widget/native_widget_aura.h"
40 #include "ui/views/widget/widget.h" 38 #include "ui/views/widget/widget.h"
41 39
42 namespace aura_shell { 40 namespace aura_shell {
43 41
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 aura::Window* default_container = 197 aura::Window* default_container =
200 GetContainer(internal::kShellWindowId_DefaultContainer); 198 GetContainer(internal::kShellWindowId_DefaultContainer);
201 launcher_.reset(new Launcher(default_container)); 199 launcher_.reset(new Launcher(default_container));
202 200
203 views::Widget* status_widget = NULL; 201 views::Widget* status_widget = NULL;
204 if (delegate_.get()) 202 if (delegate_.get())
205 status_widget = delegate_->CreateStatusArea(); 203 status_widget = delegate_->CreateStatusArea();
206 if (!status_widget) 204 if (!status_widget)
207 status_widget = internal::CreateStatusArea(); 205 status_widget = internal::CreateStatusArea();
208 206
209 internal::ShelfLayoutManager* shelf_layout_manager = 207 shelf_layout_controller_.reset(new internal::ShelfLayoutController(
210 new internal::ShelfLayoutManager(launcher_->widget(), status_widget); 208 launcher_->widget(), status_widget));
211 GetContainer(aura_shell::internal::kShellWindowId_LauncherContainer)-> 209 desktop_layout->set_shelf(shelf_layout_controller_.get());
212 SetLayoutManager(shelf_layout_manager);
213
214 internal::StatusAreaLayoutManager* status_area_layout_manager =
215 new internal::StatusAreaLayoutManager(shelf_layout_manager);
216 GetContainer(aura_shell::internal::kShellWindowId_StatusContainer)->
217 SetLayoutManager(status_area_layout_manager);
218 210
219 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraNoShadows)) 211 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraNoShadows))
220 shadow_controller_.reset(new internal::ShadowController()); 212 shadow_controller_.reset(new internal::ShadowController());
221 213
222 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraWindows)) { 214 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAuraWindows)) {
223 EnableWorkspaceManager(); 215 EnableWorkspaceManager();
224 } else { 216 } else {
225 internal::ToplevelLayoutManager* toplevel_layout_manager = 217 internal::ToplevelLayoutManager* toplevel_layout_manager =
226 new internal::ToplevelLayoutManager(); 218 new internal::ToplevelLayoutManager();
227 default_container->SetLayoutManager(toplevel_layout_manager); 219 default_container->SetLayoutManager(toplevel_layout_manager);
228 toplevel_layout_manager->set_shelf(shelf_layout_manager); 220 toplevel_layout_manager->set_shelf(shelf_layout_controller_.get());
229 } 221 }
230 222
231 // Force a layout. 223 // Force a layout.
232 desktop_layout->OnWindowResized(); 224 desktop_layout->OnWindowResized();
233 225
234 // Initialize ShellAcceleratorFilter 226 // Initialize ShellAcceleratorFilter
235 accelerator_filter_.reset(new internal::ShellAcceleratorFilter); 227 accelerator_filter_.reset(new internal::ShellAcceleratorFilter);
236 AddDesktopEventFilter(accelerator_filter_.get()); 228 AddDesktopEventFilter(accelerator_filter_.get());
237 229
238 // Initialize ShellTooltipManager 230 // Initialize ShellTooltipManager
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 new internal::WorkspaceController(default_container)); 280 new internal::WorkspaceController(default_container));
289 workspace_controller_->SetLauncherModel(launcher_->model()); 281 workspace_controller_->SetLauncherModel(launcher_->model());
290 default_container->SetEventFilter( 282 default_container->SetEventFilter(
291 new internal::DefaultContainerEventFilter(default_container)); 283 new internal::DefaultContainerEventFilter(default_container));
292 default_container->SetLayoutManager( 284 default_container->SetLayoutManager(
293 new internal::DefaultContainerLayoutManager( 285 new internal::DefaultContainerLayoutManager(
294 workspace_controller_->workspace_manager())); 286 workspace_controller_->workspace_manager()));
295 } 287 }
296 288
297 } // namespace aura_shell 289 } // namespace aura_shell
OLDNEW
« no previous file with comments | « ui/aura_shell/shell.h ('k') | ui/aura_shell/status_area_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698