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

Side by Side Diff: ash/shell.cc

Issue 10803037: [WIP] ash/extensions: Add experimental extension support for window-management in ash. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-152100 Created 8 years, 4 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
« no previous file with comments | « ash/ash.gyp ('k') | ash/shell_delegate.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/focus_manager_factory.h" 10 #include "ash/accelerators/focus_manager_factory.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #include "ash/wm/shelf_layout_manager.h" 53 #include "ash/wm/shelf_layout_manager.h"
54 #include "ash/wm/stacking_controller.h" 54 #include "ash/wm/stacking_controller.h"
55 #include "ash/wm/status_area_layout_manager.h" 55 #include "ash/wm/status_area_layout_manager.h"
56 #include "ash/wm/system_gesture_event_filter.h" 56 #include "ash/wm/system_gesture_event_filter.h"
57 #include "ash/wm/system_modal_container_layout_manager.h" 57 #include "ash/wm/system_modal_container_layout_manager.h"
58 #include "ash/wm/toplevel_window_event_filter.h" 58 #include "ash/wm/toplevel_window_event_filter.h"
59 #include "ash/wm/user_activity_detector.h" 59 #include "ash/wm/user_activity_detector.h"
60 #include "ash/wm/video_detector.h" 60 #include "ash/wm/video_detector.h"
61 #include "ash/wm/visibility_controller.h" 61 #include "ash/wm/visibility_controller.h"
62 #include "ash/wm/window_cycle_controller.h" 62 #include "ash/wm/window_cycle_controller.h"
63 #include "ash/wm/window_manager_extension.h"
63 #include "ash/wm/window_modality_controller.h" 64 #include "ash/wm/window_modality_controller.h"
64 #include "ash/wm/window_util.h" 65 #include "ash/wm/window_util.h"
65 #include "ash/wm/window_properties.h" 66 #include "ash/wm/window_properties.h"
66 #include "ash/wm/workspace/workspace_event_filter.h" 67 #include "ash/wm/workspace/workspace_event_filter.h"
67 #include "ash/wm/workspace/workspace_layout_manager.h" 68 #include "ash/wm/workspace/workspace_layout_manager.h"
68 #include "ash/wm/workspace_controller.h" 69 #include "ash/wm/workspace_controller.h"
69 #include "base/bind.h" 70 #include "base/bind.h"
70 #include "base/command_line.h" 71 #include "base/command_line.h"
71 #include "grit/ui_resources.h" 72 #include "grit/ui_resources.h"
72 #include "ui/aura/client/aura_constants.h" 73 #include "ui/aura/client/aura_constants.h"
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 video_detector_.reset(new VideoDetector); 446 video_detector_.reset(new VideoDetector);
446 window_cycle_controller_.reset( 447 window_cycle_controller_.reset(
447 new WindowCycleController(activation_controller_.get())); 448 new WindowCycleController(activation_controller_.get()));
448 449
449 tooltip_controller_.reset(new internal::TooltipController( 450 tooltip_controller_.reset(new internal::TooltipController(
450 drag_drop_controller_.get())); 451 drag_drop_controller_.get()));
451 AddEnvEventFilter(tooltip_controller_.get()); 452 AddEnvEventFilter(tooltip_controller_.get());
452 453
453 InitRootWindowController(root_window_controller); 454 InitRootWindowController(root_window_controller);
454 455
456 {
457 // Note: This needs to happen after the root-window is initialized since it
458 // needs the activation-client.
459 internal::WindowManagerExtension* wm_extension =
460 new internal::WindowManagerExtension();
461 if (delegate_.get())
462 // TODO(sad): The delegate is leaking.
463 wm_extension->set_delegate(delegate_->CreateWindowManagerDelegate());
464 }
465
455 // Initialize Primary RootWindow specific items. 466 // Initialize Primary RootWindow specific items.
456 status_area_widget_ = new internal::StatusAreaWidget(); 467 status_area_widget_ = new internal::StatusAreaWidget();
457 status_area_widget_->CreateTrayViews(delegate_.get()); 468 status_area_widget_->CreateTrayViews(delegate_.get());
458 status_area_widget_->Show(); 469 status_area_widget_->Show();
459 470
460 focus_cycler_.reset(new internal::FocusCycler()); 471 focus_cycler_.reset(new internal::FocusCycler());
461 focus_cycler_->AddWidget(status_area_widget_); 472 focus_cycler_->AddWidget(status_area_widget_);
462 473
463 // This controller needs to be set before SetupManagedWindowMode. 474 // This controller needs to be set before SetupManagedWindowMode.
464 desktop_background_controller_.reset(new DesktopBackgroundController()); 475 desktop_background_controller_.reset(new DesktopBackgroundController());
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 } 790 }
780 791
781 void Shell::ShowCursor(bool visible) { 792 void Shell::ShowCursor(bool visible) {
782 RootWindowList root_windows = GetAllRootWindows(); 793 RootWindowList root_windows = GetAllRootWindows();
783 for (RootWindowList::iterator iter = root_windows.begin(); 794 for (RootWindowList::iterator iter = root_windows.begin();
784 iter != root_windows.end(); ++iter) 795 iter != root_windows.end(); ++iter)
785 (*iter)->ShowCursor(visible); 796 (*iter)->ShowCursor(visible);
786 } 797 }
787 798
788 } // namespace ash 799 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698