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

Unified Diff: ash/magnifier/magnification_controller.h

Issue 155493002: Add key based scrolling on magnified screen for kiosk mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/ash_switches.cc ('k') | ash/magnifier/magnification_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/magnifier/magnification_controller.h
diff --git a/ash/magnifier/magnification_controller.h b/ash/magnifier/magnification_controller.h
index 75d1b2f8f3d78283f77ccdf010676e698af81c1c..c1b144431bfad93302e43bce37f9f82c57f31d81 100644
--- a/ash/magnifier/magnification_controller.h
+++ b/ash/magnifier/magnification_controller.h
@@ -5,6 +5,7 @@
#ifndef ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_
#define ASH_MAGNIFIER_MAGNIFICATION_CONTROLLER_H_
+#include "ash/ash_export.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -17,7 +18,7 @@ class RootWindow;
namespace ash {
-class MagnificationController {
+class ASH_EXPORT MagnificationController {
public:
virtual ~MagnificationController() {}
@@ -25,6 +26,9 @@ class MagnificationController {
// returned object.
static MagnificationController* CreateInstance();
+ static bool IsMagnifierAcceleratorsEnabled();
+ static void SetMagnifierAcceleratorsEnabled(bool enabled);
+
// Enables (or disables if |enabled| is false) screen magnifier feature.
virtual void SetEnabled(bool enabled) = 0;
@@ -42,18 +46,40 @@ class MagnificationController {
// Returns the current top-left point of the magnification window.
virtual gfx::Point GetWindowPosition() const = 0;
- // Ensures that the given point/rect is inside the magnification window. If
- // not, the controller moves the window to contain the given point/rect.
- virtual void EnsureRectIsVisible(const gfx::Rect& rect, bool animate) = 0;
- virtual void EnsurePointIsVisible(const gfx::Point& point, bool animate) = 0;
oshima 2014/02/06 22:57:31 They were dead code.
+ enum ScrollDirection {
+ SCROLL_NONE,
+ SCROLL_LEFT,
+ SCROLL_RIGHT,
+ SCROLL_UP,
+ SCROLL_DOWN
+ };
+
+ virtual void SetScrollDirection(ScrollDirection direction) = 0;
// Returns |point_of_interest_| in MagnificationControllerImpl. This is
// the internal variable to stores the last mouse cursor (or last touched)
// location. This method is only for test purpose.
virtual gfx::Point GetPointOfInterestForTesting() = 0;
+ // A scoped object to enable and disable the magnifier accelerator for test.
+ class ScopedMagnifierAcceleratorsEnablerForTest {
+ public:
+ ScopedMagnifierAcceleratorsEnablerForTest() {
+ MagnificationController::SetMagnifierAcceleratorsEnabled(true);
+ }
+ ~ScopedMagnifierAcceleratorsEnablerForTest() {
+ MagnificationController::SetMagnifierAcceleratorsEnabled(false);
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScopedMagnifierAcceleratorsEnablerForTest);
+ };
protected:
+
MagnificationController() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MagnificationController);
};
} // namespace ash
« no previous file with comments | « ash/ash_switches.cc ('k') | ash/magnifier/magnification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698