diff options
author | mazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 16:43:53 +0000 |
---|---|---|
committer | mazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 16:43:53 +0000 |
commit | 166ccde782c9603bfda23edd922d467a47f08cef (patch) | |
tree | fb2881a992d43b954927071812d78e77bb5ffccc /ash/test/ash_test_base.cc | |
parent | f5e8479e80f090dd1a95e701bb1f38de6718523b (diff) | |
download | chromium_src-166ccde782c9603bfda23edd922d467a47f08cef.zip chromium_src-166ccde782c9603bfda23edd922d467a47f08cef.tar.gz chromium_src-166ccde782c9603bfda23edd922d467a47f08cef.tar.bz2 |
Make the cursor have separate mode for disabled mouse events and invisible.
This CL adds the following APIs.
* CursorClient::DisableMouseEvents: Makes mouse events stop being sent
and hides the cursor if it is visible.
(For now, DisableMouseEvents just clears the hover state and doesn't
prevent mouse events from being generated, though).
* CursorClient::EnableMouseEvents: Makes mouse events start being sent
and shows the cursor if it was hidden with DisableMouseEvents.
* CursorClient::HideCursor: Makes the cursor invisible. This changes
only the cursor visibility and mouse events keep being sent even when
the cursor is invisible.
* CursorClient::ShowCursor: Makes the cursor visible. This does not take
effect When mouse events are disabled.
This CL just replaces the old usages of CursorClient::ShowCursor with
the new APIs to retain existing behavior.
I'll make another CL that uses these APIs in appropriate places.
BUG=153703
TEST=CursorManagerTest.EnableDisableMouseEvents, CursorManagerTest.ShowAndEnable
Review URL: https://chromiumcodereview.appspot.com/11412315
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173933 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test/ash_test_base.cc')
-rw-r--r-- | ash/test/ash_test_base.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc index f308e69..b9da0d7 100644 --- a/ash/test/ash_test_base.cc +++ b/ash/test/ash_test_base.cc @@ -65,7 +65,7 @@ void AshTestBase::SetUp() { // Move the mouse cursor to far away so that native events doesn't // interfere test expectations. Shell::GetPrimaryRootWindow()->MoveCursorTo(gfx::Point(-1000, -1000)); - Shell::GetInstance()->cursor_manager()->ShowCursor(true); + Shell::GetInstance()->cursor_manager()->EnableMouseEvents(); } void AshTestBase::TearDown() { |