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

Unified Diff: ui/aura/env.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: address comments 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/aura/env.cc
diff --git a/ui/aura/env.cc b/ui/aura/env.cc
index d46783f030d4925646fd231f0b157add7071fb32..eff497a9b67f2428e85d228b2d32b56dfd831357 100644
--- a/ui/aura/env.cc
+++ b/ui/aura/env.cc
@@ -5,7 +5,6 @@
#include "ui/aura/env.h"
#include "base/command_line.h"
-#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/env_observer.h"
#include "ui/aura/root_window_host.h"
#include "ui/aura/window.h"
@@ -26,7 +25,6 @@ Env* Env::instance_ = NULL;
Env::Env()
: mouse_button_flags_(0),
- is_cursor_hidden_(false),
is_touch_down_(false),
render_white_bg_(true),
stacking_client_(NULL) {
@@ -64,28 +62,6 @@ void Env::RemoveObserver(EnvObserver* observer) {
observers_.RemoveObserver(observer);
}
-void Env::SetLastMouseLocation(const Window& window,
- const gfx::Point& location_in_root) {
- last_mouse_location_ = location_in_root;
- client::ScreenPositionClient* client =
- client::GetScreenPositionClient(window.GetRootWindow());
- if (client)
- client->ConvertPointToScreen(&window, &last_mouse_location_);
-}
-
-void Env::SetCursorShown(bool cursor_shown) {
- if (cursor_shown) {
- // Protect against restoring a position that hadn't been saved.
- if (is_cursor_hidden_)
- last_mouse_location_ = hidden_cursor_location_;
- is_cursor_hidden_ = false;
- } else {
- hidden_cursor_location_ = last_mouse_location_;
- last_mouse_location_ = gfx::Point(-10000, -10000);
- is_cursor_hidden_ = true;
- }
-}
-
#if !defined(OS_MACOSX)
MessageLoop::Dispatcher* Env::GetDispatcher() {
#if defined(USE_X11)

Powered by Google App Engine
This is Rietveld 408576698