Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_ROOT_WINDOW_CONTROLLER_H_ | |
| 6 #define ASH_ROOT_WINDOW_CONTROLLER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 | |
| 12 class SkBitmap; | |
| 13 | |
| 14 namespace aura { | |
| 15 class EventFilter; | |
| 16 class RootWindow; | |
| 17 class Window; | |
| 18 namespace shared { | |
| 19 class InputMethodEventFilter; | |
| 20 class RootWindowEventFilter; | |
| 21 } // namespace shared | |
| 22 } // namespace aura | |
| 23 | |
| 24 namespace ash { | |
| 25 namespace internal { | |
| 26 | |
| 27 class EventClientImpl; | |
| 28 class RootWindowLayoutManager; | |
| 29 class ScreenDimmer; | |
| 30 class WorkspaceController; | |
| 31 | |
| 32 // This class maintains the per root window state for ash. This class | |
| 33 // owns the root window and other dependent objects that should be | |
| 34 // deleted open the deletion of the root window. The RootWindowController | |
|
Daniel Erat
2012/06/13 01:36:28
nit: s/open/upon/
oshima
2012/06/13 05:52:37
Done.
| |
| 35 // for particular root window is stored as a property and can be obtained | |
| 36 // using |GetRootWindowController(aura::RootWindow*)| function. | |
| 37 class RootWindowController { | |
| 38 public: | |
| 39 explicit RootWindowController(aura::RootWindow* root_window); | |
| 40 ~RootWindowController(); | |
| 41 | |
| 42 aura::RootWindow* root_window() { | |
| 43 return root_window_.get(); | |
| 44 } | |
| 45 | |
| 46 internal::RootWindowLayoutManager* root_window_layout() { | |
| 47 return root_window_layout_; | |
| 48 } | |
| 49 | |
| 50 internal::WorkspaceController* workspace_controller() { | |
| 51 return workspace_controller_.get(); | |
| 52 } | |
| 53 | |
| 54 internal::ScreenDimmer* screen_dimmer() { | |
| 55 return screen_dimmer_.get(); | |
| 56 } | |
| 57 | |
| 58 aura::Window* GetContainer(int container_id); | |
| 59 | |
| 60 void CreateContainers(); | |
| 61 void InitLayoutManagers(); | |
| 62 | |
| 63 // Deletes all child windows and performs necessary clean ups. | |
|
Daniel Erat
2012/06/13 01:36:28
nit: s/clean ups/cleanup/
oshima
2012/06/13 05:52:37
Done.
| |
| 64 void CloseChildWindows(); | |
| 65 | |
| 66 // Returns true if the workspace has maximized or fullscreen window. | |
|
Daniel Erat
2012/06/13 01:36:28
nit: s/has maximized/has a maximized/
oshima
2012/06/13 05:52:37
Done.
| |
| 67 bool IsInMaximizedMode() const; | |
| 68 | |
| 69 private: | |
| 70 scoped_ptr<aura::RootWindow> root_window_; | |
| 71 internal::RootWindowLayoutManager* root_window_layout_; | |
| 72 | |
| 73 // An event filter that pre-handles all key events to send them to an IME. | |
| 74 scoped_ptr<internal::EventClientImpl> event_client_; | |
| 75 scoped_ptr<internal::ScreenDimmer> screen_dimmer_; | |
| 76 scoped_ptr<internal::WorkspaceController> workspace_controller_; | |
| 77 | |
| 78 DISALLOW_COPY_AND_ASSIGN(RootWindowController); | |
| 79 }; | |
| 80 | |
| 81 } // namespace internal | |
| 82 } // ash | |
| 83 | |
| 84 #endif // ASH_ROOT_WINDOW_CONTROLLER_H_ | |
| OLD | NEW |