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

Unified Diff: ash/display/mirror_window_controller.h

Issue 15367003: Create a mirror window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix Created 7 years, 7 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
Index: ash/display/mirror_window_controller.h
diff --git a/ash/display/mirror_window_controller.h b/ash/display/mirror_window_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..36fb38fc0d70a7f7eb8442c46fade9bf923e58e5
--- /dev/null
+++ b/ash/display/mirror_window_controller.h
@@ -0,0 +1,60 @@
+// Copyright (c) 2013 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_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_
+#define ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_
+
+#include "ash/ash_export.h"
+#include "base/compiler_specific.h"
+#include "base/memory/scoped_ptr.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/point.h"
+
+namespace aura {
+class RootWindow;
+class Window;
+}
+
+namespace ash {
+namespace test{
+class MirrorWindowTestApi;
+}
+
+namespace internal {
+class DisplayInfo;
+class CursorWindowDelegate;
+
+class MirrorWindowController {
+ public:
+ MirrorWindowController();
+ ~MirrorWindowController();
+
+ // Updates the root window's bounds using |dispaly_info|.
James Cook 2013/05/21 08:07:41 dispaly_info -> display_info
oshima 2013/05/21 14:41:50 Done.
+ // Creates the new root window if one doesn't exist.
+ void UpdateWindow(const DisplayInfo& display_info);
+
+ void Close();
+
+ // Updates the mirrored cursor location,shape and
+ // visibility.
+ void UpdateCursorLocation();
+ void SetMirroredCursor(gfx::NativeCursor cursor);
+ void SetMirroredCursorVisibility(bool visible);
+
+ private:
+ friend class test::MirrorWindowTestApi;
+
+ int current_cursor_type_;
+ aura::Window* cursor_window_; // owned by root window.
+ scoped_ptr<aura::RootWindow> root_window_;
+ scoped_ptr<CursorWindowDelegate> cursor_window_delegate_;
+ gfx::Point hot_point_;
+
+ DISALLOW_COPY_AND_ASSIGN(MirrorWindowController);
+};
+
+} // namespace internal
+} // namespace ash
+
+#endif // ASH_DISPLAY_MIRROR_WINDOW_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698