diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-10 19:10:31 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-10 19:10:31 +0000 |
commit | 30be97b471b2d5178699cc0d0d771637d0a19e7c (patch) | |
tree | 3e810c820f1e6d9d9ee15ba14b44d09b92ebd288 /ash | |
parent | 6fff46c2cdaff40c29a1faf5621a2f3fa7e783f2 (diff) | |
download | chromium_src-30be97b471b2d5178699cc0d0d771637d0a19e7c.zip chromium_src-30be97b471b2d5178699cc0d0d771637d0a19e7c.tar.gz chromium_src-30be97b471b2d5178699cc0d0d771637d0a19e7c.tar.bz2 |
Remove obsolete scale related APIs for cursor
This has been replaced with SetDisplay a while ago.
BUG=None
Review URL: https://codereview.chromium.org/233053003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/test/cursor_manager_test_api.cc | 4 | ||||
-rw-r--r-- | ash/test/cursor_manager_test_api.h | 1 | ||||
-rw-r--r-- | ash/wm/ash_native_cursor_manager.cc | 10 | ||||
-rw-r--r-- | ash/wm/ash_native_cursor_manager.h | 3 | ||||
-rw-r--r-- | ash/wm/ash_native_cursor_manager_unittest.cc | 23 |
5 files changed, 0 insertions, 41 deletions
diff --git a/ash/test/cursor_manager_test_api.cc b/ash/test/cursor_manager_test_api.cc index 0b7711b9..22aa261 100644 --- a/ash/test/cursor_manager_test_api.cc +++ b/ash/test/cursor_manager_test_api.cc @@ -23,10 +23,6 @@ CursorManagerTestApi::~CursorManagerTestApi() { } // TODO(tdanderson): CursorManagerTestApi may no longer be needed. -float CursorManagerTestApi::GetCurrentScale() const { - return cursor_manager_->GetScale(); -} - ui::CursorSetType CursorManagerTestApi::GetCurrentCursorSet() const { return cursor_manager_->GetCursorSet(); } diff --git a/ash/test/cursor_manager_test_api.h b/ash/test/cursor_manager_test_api.h index d368216..1b9c6b8 100644 --- a/ash/test/cursor_manager_test_api.h +++ b/ash/test/cursor_manager_test_api.h @@ -26,7 +26,6 @@ class CursorManagerTestApi { explicit CursorManagerTestApi(::wm::CursorManager* cursor_manager); ~CursorManagerTestApi(); - float GetCurrentScale() const; ui::CursorSetType GetCurrentCursorSet() const; gfx::NativeCursor GetCurrentCursor() const; gfx::Display GetDisplay() const; diff --git a/ash/wm/ash_native_cursor_manager.cc b/ash/wm/ash_native_cursor_manager.cc index d9f4b6a..98078ac 100644 --- a/ash/wm/ash_native_cursor_manager.cc +++ b/ash/wm/ash_native_cursor_manager.cc @@ -120,16 +120,6 @@ void AshNativeCursorManager::SetCursorSet( #endif } -void AshNativeCursorManager::SetScale( - float scale, - ::wm::NativeCursorManagerDelegate* delegate) { - image_cursors_->SetScale(scale); - delegate->CommitScale(scale); - - // Sets the cursor to reflect the scale change immediately. - SetCursor(delegate->GetCursor(), delegate); -} - void AshNativeCursorManager::SetVisibility( bool visible, ::wm::NativeCursorManagerDelegate* delegate) { diff --git a/ash/wm/ash_native_cursor_manager.h b/ash/wm/ash_native_cursor_manager.h index 7124bdc..80ecc8e 100644 --- a/ash/wm/ash_native_cursor_manager.h +++ b/ash/wm/ash_native_cursor_manager.h @@ -52,9 +52,6 @@ class ASH_EXPORT AshNativeCursorManager virtual void SetVisibility( bool visible, ::wm::NativeCursorManagerDelegate* delegate) OVERRIDE; - virtual void SetScale( - float scale, - ::wm::NativeCursorManagerDelegate* delegate) OVERRIDE; virtual void SetCursorSet( ui::CursorSetType cursor_set, ::wm::NativeCursorManagerDelegate* delegate) OVERRIDE; diff --git a/ash/wm/ash_native_cursor_manager_unittest.cc b/ash/wm/ash_native_cursor_manager_unittest.cc index 141e8a8..812601f 100644 --- a/ash/wm/ash_native_cursor_manager_unittest.cc +++ b/ash/wm/ash_native_cursor_manager_unittest.cc @@ -62,9 +62,7 @@ TEST_F(AshNativeCursorManagerTest, LockCursor) { EXPECT_EQ(ui::kCursorCopy, test_api.GetCurrentCursor().native_type()); display.set_device_scale_factor(2.0f); display.set_rotation(gfx::Display::ROTATE_90); - cursor_manager->SetScale(2.5f); cursor_manager->SetDisplay(display); - EXPECT_EQ(2.5f, test_api.GetCurrentScale()); EXPECT_EQ(2.0f, test_api.GetDisplay().device_scale_factor()); EXPECT_EQ(ui::CURSOR_SET_NORMAL, test_api.GetCurrentCursorSet()); EXPECT_EQ(gfx::Display::ROTATE_90, test_api.GetDisplay().rotation()); @@ -82,13 +80,6 @@ TEST_F(AshNativeCursorManagerTest, LockCursor) { cursor_manager->SetCursorSet(ui::CURSOR_SET_NORMAL); EXPECT_EQ(ui::CURSOR_SET_NORMAL, test_api.GetCurrentCursorSet()); - // Cusror scale does change even while cursor is locked. - EXPECT_EQ(2.5f, test_api.GetCurrentScale()); - cursor_manager->SetScale(1.f); - EXPECT_EQ(1.f, test_api.GetCurrentScale()); - cursor_manager->SetScale(1.5f); - EXPECT_EQ(1.5f, test_api.GetCurrentScale()); - // Cursor type does not change while cursor is locked. cursor_manager->SetCursor(ui::kCursorPointer); EXPECT_EQ(ui::kCursorCopy, test_api.GetCurrentCursor().native_type()); @@ -104,7 +95,6 @@ TEST_F(AshNativeCursorManagerTest, LockCursor) { EXPECT_FALSE(cursor_manager->IsCursorLocked()); // Cursor type changes to the one specified while cursor is locked. - EXPECT_EQ(1.5f, test_api.GetCurrentScale()); EXPECT_EQ(ui::kCursorPointer, test_api.GetCurrentCursor().native_type()); EXPECT_EQ(1.0f, test_api.GetDisplay().device_scale_factor()); EXPECT_TRUE(test_api.GetCurrentCursor().platform()); @@ -140,19 +130,6 @@ TEST_F(AshNativeCursorManagerTest, SetCursorSet) { EXPECT_EQ(ui::CURSOR_SET_NORMAL, test_api.GetCurrentCursorSet()); } -TEST_F(AshNativeCursorManagerTest, SetScale) { - ::wm::CursorManager* cursor_manager = Shell::GetInstance()->cursor_manager(); - CursorManagerTestApi test_api(cursor_manager); - - EXPECT_EQ(1.f, test_api.GetCurrentScale()); - - cursor_manager->SetScale(2.5f); - EXPECT_EQ(2.5f, test_api.GetCurrentScale()); - - cursor_manager->SetScale(1.f); - EXPECT_EQ(1.f, test_api.GetCurrentScale()); -} - TEST_F(AshNativeCursorManagerTest, SetDeviceScaleFactorAndRotation) { ::wm::CursorManager* cursor_manager = Shell::GetInstance()->cursor_manager(); CursorManagerTestApi test_api(cursor_manager); |