summaryrefslogtreecommitdiffstats
path: root/ash/tooltips
diff options
context:
space:
mode:
authormazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-19 16:43:53 +0000
committermazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-19 16:43:53 +0000
commit166ccde782c9603bfda23edd922d467a47f08cef (patch)
treefb2881a992d43b954927071812d78e77bb5ffccc /ash/tooltips
parentf5e8479e80f090dd1a95e701bb1f38de6718523b (diff)
downloadchromium_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/tooltips')
-rw-r--r--ash/tooltips/tooltip_controller_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ash/tooltips/tooltip_controller_unittest.cc b/ash/tooltips/tooltip_controller_unittest.cc
index a4b2be3..4426654 100644
--- a/ash/tooltips/tooltip_controller_unittest.cc
+++ b/ash/tooltips/tooltip_controller_unittest.cc
@@ -267,12 +267,12 @@ TEST_F(TooltipControllerTest, HideTooltipWhenCursorHidden) {
EXPECT_TRUE(IsTooltipVisible());
// Hide the cursor and check again.
- ash::Shell::GetInstance()->cursor_manager()->ShowCursor(false);
+ ash::Shell::GetInstance()->cursor_manager()->DisableMouseEvents();
FireTooltipTimer();
EXPECT_FALSE(IsTooltipVisible());
// Show the cursor and re-check.
- ash::Shell::GetInstance()->cursor_manager()->ShowCursor(true);
+ ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents();
FireTooltipTimer();
EXPECT_TRUE(IsTooltipVisible());
}