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

Side by Side Diff: ash/shell.cc

Issue 11201002: Removes worskpace 1 code. Will rename next. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove more code Created 8 years, 2 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 (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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "ash/wm/system_gesture_event_filter.h" 52 #include "ash/wm/system_gesture_event_filter.h"
53 #include "ash/wm/system_modal_container_event_filter.h" 53 #include "ash/wm/system_modal_container_event_filter.h"
54 #include "ash/wm/system_modal_container_layout_manager.h" 54 #include "ash/wm/system_modal_container_layout_manager.h"
55 #include "ash/wm/user_activity_detector.h" 55 #include "ash/wm/user_activity_detector.h"
56 #include "ash/wm/video_detector.h" 56 #include "ash/wm/video_detector.h"
57 #include "ash/wm/visibility_controller.h" 57 #include "ash/wm/visibility_controller.h"
58 #include "ash/wm/window_cycle_controller.h" 58 #include "ash/wm/window_cycle_controller.h"
59 #include "ash/wm/window_modality_controller.h" 59 #include "ash/wm/window_modality_controller.h"
60 #include "ash/wm/window_properties.h" 60 #include "ash/wm/window_properties.h"
61 #include "ash/wm/window_util.h" 61 #include "ash/wm/window_util.h"
62 #include "ash/wm/workspace/workspace_layout_manager.h"
63 #include "ash/wm/workspace_controller.h" 62 #include "ash/wm/workspace_controller.h"
64 #include "base/bind.h" 63 #include "base/bind.h"
65 #include "base/command_line.h" 64 #include "base/command_line.h"
66 #include "ui/aura/client/aura_constants.h" 65 #include "ui/aura/client/aura_constants.h"
67 #include "ui/aura/client/user_action_client.h" 66 #include "ui/aura/client/user_action_client.h"
68 #include "ui/aura/display_manager.h" 67 #include "ui/aura/display_manager.h"
69 #include "ui/aura/env.h" 68 #include "ui/aura/env.h"
70 #include "ui/aura/focus_manager.h" 69 #include "ui/aura/focus_manager.h"
71 #include "ui/aura/layout_manager.h" 70 #include "ui/aura/layout_manager.h"
72 #include "ui/aura/root_window.h" 71 #include "ui/aura/root_window.h"
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 if (user_action_client_.get()) 732 if (user_action_client_.get())
734 aura::client::SetUserActionClient(root_window, user_action_client_.get()); 733 aura::client::SetUserActionClient(root_window, user_action_client_.get());
735 734
736 root_window->SetCursor(ui::kCursorPointer); 735 root_window->SetCursor(ui::kCursorPointer);
737 controller->InitLayoutManagers(); 736 controller->InitLayoutManagers();
738 737
739 // TODO(oshima): Move the instance to RootWindowController when 738 // TODO(oshima): Move the instance to RootWindowController when
740 // the extended desktop is enabled by default. 739 // the extended desktop is enabled by default.
741 internal::AlwaysOnTopController* always_on_top_controller = 740 internal::AlwaysOnTopController* always_on_top_controller =
742 new internal::AlwaysOnTopController; 741 new internal::AlwaysOnTopController;
743 always_on_top_controller->SetContainers( 742 always_on_top_controller->SetAlwaysOnTopContainer(
744 root_window->GetChildById(internal::kShellWindowId_DefaultContainer),
745 root_window->GetChildById(internal::kShellWindowId_AlwaysOnTopContainer)); 743 root_window->GetChildById(internal::kShellWindowId_AlwaysOnTopContainer));
746 root_window->SetProperty(internal::kAlwaysOnTopControllerKey, 744 root_window->SetProperty(internal::kAlwaysOnTopControllerKey,
747 always_on_top_controller); 745 always_on_top_controller);
748 if (GetPrimaryRootWindowController()->GetSystemModalLayoutManager(NULL)-> 746 if (GetPrimaryRootWindowController()->GetSystemModalLayoutManager(NULL)->
749 has_modal_background()) { 747 has_modal_background()) {
750 controller->GetSystemModalLayoutManager(NULL)->CreateModalBackground(); 748 controller->GetSystemModalLayoutManager(NULL)->CreateModalBackground();
751 } 749 }
752 750
753 window_cycle_controller_->OnRootWindowAdded(root_window); 751 window_cycle_controller_->OnRootWindowAdded(root_window);
754 } 752 }
755 753
756 //////////////////////////////////////////////////////////////////////////////// 754 ////////////////////////////////////////////////////////////////////////////////
757 // Shell, private: 755 // Shell, private:
758 756
759 bool Shell::CanWindowReceiveEvents(aura::Window* window) { 757 bool Shell::CanWindowReceiveEvents(aura::Window* window) {
760 RootWindowControllerList controllers = GetAllRootWindowControllers(); 758 RootWindowControllerList controllers = GetAllRootWindowControllers();
761 for (RootWindowControllerList::iterator iter = controllers.begin(); 759 for (RootWindowControllerList::iterator iter = controllers.begin();
762 iter != controllers.end(); ++iter) { 760 iter != controllers.end(); ++iter) {
763 if ((*iter)->GetSystemModalLayoutManager(window)-> 761 if ((*iter)->GetSystemModalLayoutManager(window)->
764 CanWindowReceiveEvents(window)) { 762 CanWindowReceiveEvents(window)) {
765 return true; 763 return true;
766 } 764 }
767 } 765 }
768 return false; 766 return false;
769 } 767 }
770 768
771 } // namespace ash 769 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698