diff options
author | pkotwicz <pkotwicz@chromium.org> | 2014-10-30 21:21:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-31 04:21:18 +0000 |
commit | 0991c82d09351fa95d96a5ed7cb1082e33daea5b (patch) | |
tree | e98baf040cff44c0b13963e099791ae6883740ee /ash/magnifier | |
parent | 826a0bcea4beff6c6feca3f29d2779bd4f258c48 (diff) | |
download | chromium_src-0991c82d09351fa95d96a5ed7cb1082e33daea5b.zip chromium_src-0991c82d09351fa95d96a5ed7cb1082e33daea5b.tar.gz chromium_src-0991c82d09351fa95d96a5ed7cb1082e33daea5b.tar.bz2 |
Make chrome/browser/chromeos/accessibility compile on Athena with use_ash=0
This CL:
- Moves the constants in magnifier_constants.h and accessibility_delegate.h
to ui/chromeos/accessibility_types.
- Stops compiling MagnificationManager on Athena
BUG=426561, 408733
TEST=None
Review URL: https://codereview.chromium.org/682943002
Cr-Commit-Position: refs/heads/master@{#302218}
Diffstat (limited to 'ash/magnifier')
-rw-r--r-- | ash/magnifier/magnification_controller_unittest.cc | 18 | ||||
-rw-r--r-- | ash/magnifier/magnifier_constants.h | 27 |
2 files changed, 9 insertions, 36 deletions
diff --git a/ash/magnifier/magnification_controller_unittest.cc b/ash/magnifier/magnification_controller_unittest.cc index 7aad797..3cb5438 100644 --- a/ash/magnifier/magnification_controller_unittest.cc +++ b/ash/magnifier/magnification_controller_unittest.cc @@ -4,7 +4,6 @@ #include "ash/magnifier/magnification_controller.h" -#include "ash/magnifier/magnifier_constants.h" #include "ash/shell.h" #include "ash/test/ash_test_base.h" #include "base/strings/stringprintf.h" @@ -13,6 +12,7 @@ #include "ui/aura/test/aura_test_utils.h" #include "ui/aura/window_tree_host.h" #include "ui/base/ime/input_method.h" +#include "ui/chromeos/accessibility_types.h" #include "ui/events/test/event_generator.h" #include "ui/gfx/rect_conversions.h" #include "ui/gfx/screen.h" @@ -441,7 +441,7 @@ TEST_F(MagnificationControllerTest, PanWindowToRight) { GetMagnificationController()->SetEnabled(true); EXPECT_FLOAT_EQ(2.f, GetMagnificationController()->GetScale()); - scale *= kMagnificationScaleFactor; + scale *= ui::kMagnificationScaleFactor; GetMagnificationController()->SetScale(scale, false); EXPECT_FLOAT_EQ(2.3784142, GetMagnificationController()->GetScale()); generator.MoveMouseToInHost(gfx::Point(400, 300)); @@ -450,21 +450,21 @@ TEST_F(MagnificationControllerTest, PanWindowToRight) { EXPECT_EQ("566,299", env->last_mouse_location().ToString()); EXPECT_EQ("705,300", GetHostMouseLocation()); - scale *= kMagnificationScaleFactor; + scale *= ui::kMagnificationScaleFactor; GetMagnificationController()->SetScale(scale, false); EXPECT_FLOAT_EQ(2.8284268, GetMagnificationController()->GetScale()); generator.MoveMouseToInHost(gfx::Point(799, 300)); EXPECT_EQ("599,299", env->last_mouse_location().ToString()); EXPECT_EQ("702,300", GetHostMouseLocation()); - scale *= kMagnificationScaleFactor; + scale *= ui::kMagnificationScaleFactor; GetMagnificationController()->SetScale(scale, false); EXPECT_FLOAT_EQ(3.3635852, GetMagnificationController()->GetScale()); generator.MoveMouseToInHost(gfx::Point(799, 300)); EXPECT_EQ("627,298", env->last_mouse_location().ToString()); EXPECT_EQ("707,300", GetHostMouseLocation()); - scale *= kMagnificationScaleFactor; + scale *= ui::kMagnificationScaleFactor; GetMagnificationController()->SetScale(scale, false); EXPECT_FLOAT_EQ(4.f, GetMagnificationController()->GetScale()); generator.MoveMouseToInHost(gfx::Point(799, 300)); @@ -487,7 +487,7 @@ TEST_F(MagnificationControllerTest, PanWindowToLeft) { GetMagnificationController()->SetEnabled(true); EXPECT_FLOAT_EQ(2.f, GetMagnificationController()->GetScale()); - scale *= kMagnificationScaleFactor; + scale *= ui::kMagnificationScaleFactor; GetMagnificationController()->SetScale(scale, false); EXPECT_FLOAT_EQ(2.3784142, GetMagnificationController()->GetScale()); generator.MoveMouseToInHost(gfx::Point(400, 300)); @@ -496,21 +496,21 @@ TEST_F(MagnificationControllerTest, PanWindowToLeft) { EXPECT_EQ("231,299", env->last_mouse_location().ToString()); EXPECT_EQ("100,300", GetHostMouseLocation()); - scale *= kMagnificationScaleFactor; + scale *= ui::kMagnificationScaleFactor; GetMagnificationController()->SetScale(scale, false); EXPECT_FLOAT_EQ(2.8284268, GetMagnificationController()->GetScale()); generator.MoveMouseToInHost(gfx::Point(0, 300)); EXPECT_EQ("194,299", env->last_mouse_location().ToString()); EXPECT_EQ("99,300", GetHostMouseLocation()); - scale *= kMagnificationScaleFactor; + scale *= ui::kMagnificationScaleFactor; GetMagnificationController()->SetScale(scale, false); EXPECT_FLOAT_EQ(3.3635852, GetMagnificationController()->GetScale()); generator.MoveMouseToInHost(gfx::Point(0, 300)); EXPECT_EQ("164,298", env->last_mouse_location().ToString()); EXPECT_EQ("98,300", GetHostMouseLocation()); - scale *= kMagnificationScaleFactor; + scale *= ui::kMagnificationScaleFactor; GetMagnificationController()->SetScale(scale, false); EXPECT_FLOAT_EQ(4.f, GetMagnificationController()->GetScale()); generator.MoveMouseToInHost(gfx::Point(0, 300)); diff --git a/ash/magnifier/magnifier_constants.h b/ash/magnifier/magnifier_constants.h deleted file mode 100644 index b286299..0000000 --- a/ash/magnifier/magnifier_constants.h +++ /dev/null @@ -1,27 +0,0 @@ -// 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_MAGNIFIER_CONSTANTS_H_ -#define ASH_MAGNIFIER_MAGNIFIER_CONSTANTS_H_ - -namespace ash { - -// Note: Do not change these values; UMA and prefs depend on them. -enum MagnifierType { - MAGNIFIER_FULL = 1, - MAGNIFIER_PARTIAL = 2, -}; - -const int kMaxMagnifierType = 2; - -const MagnifierType kDefaultMagnifierType = MAGNIFIER_FULL; - -// Factor of magnification scale. For example, when this value is 1.189, scale -// value will be changed x1.000, x1.189, x1.414, x1.681, x2.000, ... -// Note: this value is 2.0 ^ (1 / 4). -const float kMagnificationScaleFactor = 1.18920712f; - -} // namespace ash - -#endif // ASH_MAGNIFIER_MAGNIFIER_CONSTANTS_H_ |