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

Unified Diff: ui/views/widget/desktop_aura/desktop_cursor_client.cc

Issue 11412315: Make the cursor have separate mode for disabled mouse events and invisible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura Created 8 years 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
Index: ui/views/widget/desktop_aura/desktop_cursor_client.cc
diff --git a/ui/views/widget/desktop_aura/desktop_cursor_client.cc b/ui/views/widget/desktop_aura/desktop_cursor_client.cc
index 10d7d10c1ea035cfacd0ea85c39977ec8d9a2a34..b027e74b62ce17aed6933f22d7ca759ea56ba179 100644
--- a/ui/views/widget/desktop_aura/desktop_cursor_client.cc
+++ b/ui/views/widget/desktop_aura/desktop_cursor_client.cc
@@ -26,21 +26,34 @@ void DesktopCursorClient::SetCursor(gfx::NativeCursor cursor) {
root_window_->SetCursor(current_cursor_);
}
-void DesktopCursorClient::ShowCursor(bool show) {
- if (cursor_visible_ == show)
- return;
- cursor_visible_ = show;
- if (cursor_visible_)
- root_window_->SetCursor(current_cursor_);
- else
- root_window_->SetCursor(ui::kCursorNone);
- root_window_->OnCursorVisibilityChanged(cursor_visible_);
+void DesktopCursorClient::ShowCursor() {
+ SetCursorVisibility(true);
+}
+
+void DesktopCursorClient::HideCursor() {
+ SetCursorVisibility(false);
}
bool DesktopCursorClient::IsCursorVisible() const {
return cursor_visible_;
}
+void DesktopCursorClient::EnableMouseEvents() {
+ // TODO(mazda): Implement this.
+ NOTIMPLEMENTED();
+}
+
+void DesktopCursorClient::DisableMouseEvents() {
+ // TODO(mazda): Implement this.
+ NOTIMPLEMENTED();
+}
+
+bool DesktopCursorClient::IsMouseEventsEnabled() const {
+ // TODO(mazda): Implement this.
+ NOTIMPLEMENTED();
+ return true;
+}
+
void DesktopCursorClient::SetDeviceScaleFactor(float device_scale_factor) {
cursor_loader_->UnloadAll();
cursor_loader_->set_device_scale_factor(device_scale_factor);
@@ -56,4 +69,12 @@ void DesktopCursorClient::UnlockCursor() {
NOTIMPLEMENTED();
}
+void DesktopCursorClient::SetCursorVisibility(bool visible) {
+ if (cursor_visible_ == visible)
+ return;
+ cursor_visible_ = visible;
+ root_window_->SetCursor(current_cursor_);
+ root_window_->OnCursorVisibilityChanged(visible);
+}
+
} // namespace views
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_cursor_client.h ('k') | ui/views/widget/desktop_aura/desktop_root_window_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698