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

Unified Diff: ash/magnifier/magnified_cursor.h

Issue 10388141: Full-screen Magnifier: Support warping the cursor on the edge (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Make MagnificationController virtual class. Created 8 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/magnifier/magnified_cursor.h
diff --git a/ash/magnifier/magnified_cursor.h b/ash/magnifier/magnified_cursor.h
new file mode 100644
index 0000000000000000000000000000000000000000..64681ad1ed11bda039e00dfd55d4bd3bf8b54eff
--- /dev/null
+++ b/ash/magnifier/magnified_cursor.h
@@ -0,0 +1,44 @@
+// 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_MAGNIFIER_MAGNIFIED_CURSOR_H_
+#define ASH_MAGNIFIER_MAGNIFIED_CURSOR_H_
+#pragma once
+
+#include "ui/compositor/layer_delegate.h"
+#include "ui/compositor/layer.h"
+#include "ui/gfx/image/image.h"
+#include "ui/gfx/canvas.h"
+
+namespace aura {
+class RootWindow;
+}
+
+namespace ash {
+namespace internal {
+
+class MagnifiedCursor : public ui::LayerDelegate {
+ public:
+ explicit MagnifiedCursor(aura::RootWindow* root_window);
+ virtual ~MagnifiedCursor() {}
+
+ ui::Layer* layer() { return layer_.get(); }
+ void MovePointer(gfx::Point position);
+ void SetVisible(bool show);
+
+ // ui::LayerDelegate implementation:
+ virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
+
+ private:
+ scoped_ptr<ui::Layer> layer_;
+ aura::RootWindow* root_window_;
+
+ DISALLOW_COPY_AND_ASSIGN(MagnifiedCursor);
+};
+
+}
+}
+
+#endif // ASH_MAGNIFIER_MAGNIFIED_CURSOR_H_

Powered by Google App Engine
This is Rietveld 408576698