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

Unified Diff: ash/root_window_controller.h

Issue 10546024: Add RootWindowController (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/launcher/launcher_context_menu.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.h
diff --git a/ash/root_window_controller.h b/ash/root_window_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..66cf1050cf420acfe9762028867f7bf81a933ef3
--- /dev/null
+++ b/ash/root_window_controller.h
@@ -0,0 +1,84 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_ROOT_WINDOW_CONTROLLER_H_
+#define ASH_ROOT_WINDOW_CONTROLLER_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+
+class SkBitmap;
+
+namespace aura {
+class EventFilter;
+class RootWindow;
+class Window;
+namespace shared {
+class InputMethodEventFilter;
+class RootWindowEventFilter;
+} // namespace shared
+} // namespace aura
+
+namespace ash {
+namespace internal {
+
+class EventClientImpl;
+class RootWindowLayoutManager;
+class ScreenDimmer;
+class WorkspaceController;
+
+// This class maintains the per root window state for ash. This class
+// owns the root window and other dependent objects that should be
+// deleted upon the deletion of the root window. The RootWindowController
+// for particular root window is stored as a property and can be obtained
+// using |GetRootWindowController(aura::RootWindow*)| function.
+class RootWindowController {
+ public:
+ explicit RootWindowController(aura::RootWindow* root_window);
+ ~RootWindowController();
+
+ aura::RootWindow* root_window() {
+ return root_window_.get();
+ }
+
+ internal::RootWindowLayoutManager* root_window_layout() {
+ return root_window_layout_;
+ }
+
+ internal::WorkspaceController* workspace_controller() {
+ return workspace_controller_.get();
+ }
+
+ internal::ScreenDimmer* screen_dimmer() {
+ return screen_dimmer_.get();
+ }
+
+ aura::Window* GetContainer(int container_id);
+
+ void CreateContainers();
+ void InitLayoutManagers();
+
+ // Deletes all child windows and performs necessary cleanup.
+ void CloseChildWindows();
+
+ // Returns true if the workspace has a maximized or fullscreen window.
+ bool IsInMaximizedMode() const;
+
+ private:
+ scoped_ptr<aura::RootWindow> root_window_;
+ internal::RootWindowLayoutManager* root_window_layout_;
+
+ // An event filter that pre-handles all key events to send them to an IME.
+ scoped_ptr<internal::EventClientImpl> event_client_;
+ scoped_ptr<internal::ScreenDimmer> screen_dimmer_;
+ scoped_ptr<internal::WorkspaceController> workspace_controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(RootWindowController);
+};
+
+} // namespace internal
+} // ash
+
+#endif // ASH_ROOT_WINDOW_CONTROLLER_H_
« no previous file with comments | « ash/launcher/launcher_context_menu.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698