summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-23 21:09:44 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-23 21:09:44 +0000
commitce910b9d066453ea491473c4ef9e73b163a58d6d (patch)
treef35c7ba00ec6eef19d9811182a72c91f71039610
parent87f90841151c3e6f177687b2c722af0898f7b350 (diff)
downloadchromium_src-ce910b9d066453ea491473c4ef9e73b163a58d6d.zip
chromium_src-ce910b9d066453ea491473c4ef9e73b163a58d6d.tar.gz
chromium_src-ce910b9d066453ea491473c4ef9e73b163a58d6d.tar.bz2
More RootView cleanup:
- SetCursor->Widget API, remove platform ifdefs from root_view.cc for cursor updating - Remove weird native focus stuff, only used by ScrollView and seems not to have any effect on old options window. This is the sort of thing that should be handled by FocusManager anyway. - Remove DefaultKeyboardHandler concept in RootView. It does seem useful, but it's broken currently, and only ScrollView uses it (and hence only the old options window, which is not long for this earth). I would like to eventually replace this with a more generalized pre-processing/hierarchy processing/post-processing based event handling design. - Add OVERRIDE to RootView overrides. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6584001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75786 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--views/controls/scroll_view.cc10
-rw-r--r--views/controls/scroll_view.h3
-rw-r--r--views/view_unittest.cc7
-rw-r--r--views/widget/native_widget.h1
-rw-r--r--views/widget/native_widget_win.cc12
-rw-r--r--views/widget/native_widget_win.h5
-rw-r--r--views/widget/root_view.cc82
-rw-r--r--views/widget/root_view.h68
-rw-r--r--views/widget/widget.h2
-rw-r--r--views/widget/widget_gtk.cc17
-rw-r--r--views/widget/widget_gtk.h1
-rw-r--r--views/widget/widget_impl.cc4
-rw-r--r--views/widget/widget_impl.h2
-rw-r--r--views/widget/widget_win.cc12
-rw-r--r--views/widget/widget_win.h5
15 files changed, 88 insertions, 143 deletions
diff --git a/views/controls/scroll_view.cc b/views/controls/scroll_view.cc
index 9db46da..6a2b912 100644
--- a/views/controls/scroll_view.cc
+++ b/views/controls/scroll_view.cc
@@ -383,16 +383,6 @@ int ScrollView::GetScrollIncrement(ScrollBar* source, bool is_page,
return is_horizontal ? viewport_->width() / 5 : viewport_->height() / 5;
}
-void ScrollView::ViewHierarchyChanged(bool is_add, View *parent, View *child) {
- if (is_add) {
- RootView* rv = GetRootView();
- if (rv) {
- rv->SetDefaultKeyboardHandler(this);
- rv->SetFocusOnMousePressed(true);
- }
- }
-}
-
bool ScrollView::OnKeyPressed(const KeyEvent& event) {
bool processed = false;
diff --git a/views/controls/scroll_view.h b/views/controls/scroll_view.h
index 2a3e8fd..d8ffd15 100644
--- a/views/controls/scroll_view.h
+++ b/views/controls/scroll_view.h
@@ -72,9 +72,6 @@ class ScrollView : public View,
bool is_page,
bool is_positive);
- // Overridden to setup keyboard ui when the view hierarchy changes
- virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child);
-
// Keyboard events
virtual bool OnKeyPressed(const KeyEvent& event);
virtual bool OnMouseWheel(const MouseWheelEvent& e);
diff --git a/views/view_unittest.cc b/views/view_unittest.cc
index 90b228a..a285899 100644
--- a/views/view_unittest.cc
+++ b/views/view_unittest.cc
@@ -1124,7 +1124,12 @@ class SimpleWindowDelegate : public WindowDelegate {
// under the mouse.
// TODO(jcampan): http://crbug.com/10572 Disabled as it fails on the Vista build
// bot.
-TEST_F(ViewTest, FAILS_RerouteMouseWheelTest) {
+// Note that this fails for a variety of reasons:
+// - focused view is apparently reset across window activations and never
+// properly restored
+// - this test depends on you not having any other window visible open under the
+// area that it opens the test windows. --beng
+TEST_F(ViewTest, DISABLED_RerouteMouseWheelTest) {
TestViewWithControls* view_with_controls = new TestViewWithControls();
views::Window* window1 =
views::Window::CreateChromeWindow(
diff --git a/views/widget/native_widget.h b/views/widget/native_widget.h
index 41782e5..4b594e0 100644
--- a/views/widget/native_widget.h
+++ b/views/widget/native_widget.h
@@ -72,6 +72,7 @@ class NativeWidget {
virtual void SchedulePaintInRect(const gfx::Rect& rect) = 0;
virtual void FocusNativeView(gfx::NativeView native_view) = 0;
virtual void RunShellDrag(const ui::OSExchangeData& data, int operation) = 0;
+ virtual void SetCursor(gfx::NativeCursor cursor) = 0;
virtual WidgetImpl* GetWidgetImpl() = 0;
virtual const WidgetImpl* GetWidgetImpl() const = 0;
};
diff --git a/views/widget/native_widget_win.cc b/views/widget/native_widget_win.cc
index e5e87ef..b63fb34 100644
--- a/views/widget/native_widget_win.cc
+++ b/views/widget/native_widget_win.cc
@@ -38,7 +38,8 @@ const int kMSAAObjectID = 1;
NativeWidgetWin::NativeWidgetWin(NativeWidgetListener* listener)
: listener_(listener),
active_mouse_tracking_flags_(0),
- has_capture_(false) {
+ has_capture_(false),
+ previous_cursor_(NULL) {
}
NativeWidgetWin::~NativeWidgetWin() {
@@ -187,6 +188,15 @@ void NativeWidgetWin::RunShellDrag(const ui::OSExchangeData& data,
ui::DragDropTypes::DragOperationToDropEffect(operation), &effects);
}
+void NativeWidgetWin::SetCursor(gfx::NativeCursor cursor) {
+ if (cursor) {
+ previous_cursor_ = ::SetCursor(cursor);
+ } else if (previous_cursor_) {
+ ::SetCursor(previous_cursor_);
+ previous_cursor_ = NULL;
+ }
+}
+
WidgetImpl* NativeWidgetWin::GetWidgetImpl() {
return listener_->GetWidgetImpl();
}
diff --git a/views/widget/native_widget_win.h b/views/widget/native_widget_win.h
index 3f0f86e..17f460b 100644
--- a/views/widget/native_widget_win.h
+++ b/views/widget/native_widget_win.h
@@ -83,6 +83,7 @@ class NativeWidgetWin : public NativeWidget,
virtual void SchedulePaintInRect(const gfx::Rect& rect);
virtual void FocusNativeView(gfx::NativeView native_view);
virtual void RunShellDrag(const ui::OSExchangeData& data, int operation);
+ virtual void SetCursor(gfx::NativeCursor cursor);
virtual WidgetImpl* GetWidgetImpl();
virtual const WidgetImpl* GetWidgetImpl() const;
@@ -262,6 +263,10 @@ class NativeWidgetWin : public NativeWidget,
// window.
scoped_ptr<gfx::CanvasSkia> window_contents_;
+ // The last cursor that was active before the current one was selected. Saved
+ // so that we can restore it.
+ gfx::NativeCursor previous_cursor_;
+
// Properties associated with this NativeWidget implementation.
// TODO(beng): move to WidgetImpl.
ViewProps props_;
diff --git a/views/widget/root_view.cc b/views/widget/root_view.cc
index 4f2038e..805e62c 100644
--- a/views/widget/root_view.cc
+++ b/views/widget/root_view.cc
@@ -6,10 +6,6 @@
#include <algorithm>
-#if defined(TOUCH_UI) && defined(HAVE_XINPUT2)
-#include <gdk/gdkx.h>
-#endif
-
#include "base/logging.h"
#include "base/message_loop.h"
#include "ui/base/dragdrop/drag_drop_types.h"
@@ -22,16 +18,7 @@
#if defined(TOUCH_UI)
#include "views/touchui/gesture_manager.h"
-#if defined(HAVE_XINPUT2)
-#include "ui/gfx/gtk_util.h"
-#include "views/touchui/touch_factory.h"
#endif
-#endif
-
-#if defined(OS_LINUX)
-#include "views/widget/widget_gtk.h"
-#include "views/controls/textfield/native_textfield_views.h"
-#endif // defined(OS_LINUX)
namespace views {
@@ -49,10 +36,6 @@ RootView::RootView(Widget* widget)
mouse_move_handler_(NULL),
last_click_handler_(NULL),
explicit_mouse_handler_(false),
-#if defined(OS_WIN)
- previous_cursor_(NULL),
-#endif
- default_keyboard_handler_(NULL),
last_mouse_event_flags_(0),
last_mouse_event_x_(-1),
last_mouse_event_y_(-1),
@@ -61,8 +44,6 @@ RootView::RootView(Widget* widget)
touch_pressed_handler_(NULL),
#endif
ALLOW_THIS_IN_INITIALIZER_LIST(focus_search_(this, false, false)),
- focus_on_mouse_pressed_(false),
- ignore_set_focus_calls_(false),
focus_traversable_parent_(NULL),
focus_traversable_parent_view_(NULL) {
}
@@ -132,20 +113,9 @@ bool RootView::ProcessKeyEvent(const KeyEvent& event) {
consumed = (event.type() == ui::ET_KEY_PRESSED) ?
v->OnKeyPressed(event) : v->OnKeyReleased(event);
}
-
- if (!consumed && default_keyboard_handler_) {
- consumed = (event.type() == ui::ET_KEY_PRESSED) ?
- default_keyboard_handler_->OnKeyPressed(event) :
- default_keyboard_handler_->OnKeyReleased(event);
- }
-
return consumed;
}
-void RootView::SetDefaultKeyboardHandler(View* v) {
- default_keyboard_handler_ = v;
-}
-
bool RootView::ProcessMouseWheelEvent(const MouseWheelEvent& e) {
View* v;
bool consumed = false;
@@ -154,19 +124,11 @@ bool RootView::ProcessMouseWheelEvent(const MouseWheelEvent& e) {
for (v = focused_view; v && v != this && !consumed; v = v->parent())
consumed = v->OnMouseWheel(e);
}
-
- if (!consumed && default_keyboard_handler_) {
- consumed = default_keyboard_handler_->OnMouseWheel(e);
- }
return consumed;
}
// Focus -----------------------------------------------------------------------
-void RootView::SetFocusOnMousePressed(bool f) {
- focus_on_mouse_pressed_ = f;
-}
-
void RootView::SetFocusTraversableParent(FocusTraversable* focus_traversable) {
DCHECK(focus_traversable != this);
focus_traversable_parent_ = focus_traversable;
@@ -292,18 +254,6 @@ bool RootView::OnMousePressed(const MouseEvent& e) {
// Reset mouse_pressed_handler_ to indicate that no processing is occurring.
mouse_pressed_handler_ = NULL;
- if (focus_on_mouse_pressed_) {
-#if defined(OS_WIN)
- HWND hwnd = GetWidget()->GetNativeView();
- if (::GetFocus() != hwnd)
- ::SetFocus(hwnd);
-#else
- GtkWidget* widget = GetWidget()->GetNativeView();
- if (!gtk_widget_is_focus(widget))
- gtk_widget_grab_focus(widget);
-#endif
- }
-
// In the event that a double-click is not handled after traversing the
// entire hierarchy (even as a single-click when sent to a different view),
// it must be marked as handled to avoid anything happening from default
@@ -379,11 +329,11 @@ void RootView::OnMouseMoved(const MouseEvent& e) {
gfx::NativeCursor cursor = mouse_move_handler_->GetCursorForPoint(
moved_event.type(), moved_event.location());
- SetActiveCursor(cursor);
+ widget_->SetCursor(cursor);
} else if (mouse_move_handler_ != NULL) {
MouseEvent exited_event(ui::ET_MOUSE_EXITED, 0, 0, 0);
mouse_move_handler_->OnMouseExited(exited_event);
- SetActiveCursor(NULL);
+ widget_->SetCursor(NULL);
}
}
@@ -480,8 +430,6 @@ void RootView::ViewHierarchyChanged(bool is_add, View* parent, View* child) {
mouse_pressed_handler_ = NULL;
if (mouse_move_handler_ == child)
mouse_move_handler_ = NULL;
- if (default_keyboard_handler_ == child)
- default_keyboard_handler_ = NULL;
#if defined(TOUCH_UI)
if (touch_pressed_handler_)
touch_pressed_handler_ = NULL;
@@ -530,31 +478,7 @@ void RootView::UpdateCursor(const MouseEvent& e) {
View::ConvertPointToView(this, v, &l);
cursor = v->GetCursorForPoint(e.type(), l);
}
- SetActiveCursor(cursor);
-}
-
-void RootView::SetActiveCursor(gfx::NativeCursor cursor) {
-#if defined(OS_WIN)
- if (cursor) {
- previous_cursor_ = ::SetCursor(cursor);
- } else if (previous_cursor_) {
- ::SetCursor(previous_cursor_);
- previous_cursor_ = NULL;
- }
-#elif defined(OS_LINUX)
- gfx::NativeView native_view =
- static_cast<WidgetGtk*>(GetWidget())->window_contents();
- if (!native_view)
- return;
-
-#if defined(TOUCH_UI) && defined(HAVE_XINPUT2)
- if (!TouchFactory::GetInstance()->is_cursor_visible()) {
- cursor = gfx::GetCursor(GDK_BLANK_CURSOR);
- }
-#endif
-
- gdk_window_set_cursor(native_view->window, cursor);
-#endif
+ widget_->SetCursor(cursor);
}
void RootView::SetMouseLocationAndFlags(const MouseEvent& e) {
diff --git a/views/widget/root_view.h b/views/widget/root_view.h
index 830a85d..c8df5a9 100644
--- a/views/widget/root_view.h
+++ b/views/widget/root_view.h
@@ -72,14 +72,6 @@ class RootView : public View,
// it. Returns whether anyone consumed the event.
bool ProcessKeyEvent(const KeyEvent& event);
- // Set the default keyboard handler. The default keyboard handler is
- // a view that will get an opportunity to process key events when all
- // views in the focus path did not process an event.
- //
- // Note: this is a single view at this point. We may want to make
- // this a list if needed.
- void SetDefaultKeyboardHandler(View* v);
-
// Process a mousewheel event. Return true if the event was processed
// and false otherwise.
// MouseWheel events are sent on the focus path.
@@ -93,10 +85,6 @@ class RootView : public View,
// Focus ---------------------------------------------------------------------
- // Set whether this root view should focus the corresponding hwnd
- // when an unprocessed mouse event occurs.
- void SetFocusOnMousePressed(bool f);
-
// Used to set the FocusTraversable parent after the view has been created
// (typically when the hierarchy changes and this RootView is added/removed).
virtual void SetFocusTraversableParent(FocusTraversable* focus_traversable);
@@ -115,30 +103,31 @@ class RootView : public View,
void NotifyLocaleChanged();
// Overridden from FocusTraversable:
- virtual FocusSearch* GetFocusSearch();
- virtual FocusTraversable* GetFocusTraversableParent();
- virtual View* GetFocusTraversableParentView();
+ virtual FocusSearch* GetFocusSearch() OVERRIDE;
+ virtual FocusTraversable* GetFocusTraversableParent() OVERRIDE;
+ virtual View* GetFocusTraversableParentView() OVERRIDE;
// Overridden from View:
- virtual void SchedulePaintInRect(const gfx::Rect& rect);
- virtual const Widget* GetWidget() const;
- virtual Widget* GetWidget();
- virtual bool OnMousePressed(const MouseEvent& e);
- virtual bool OnMouseDragged(const MouseEvent& e);
- virtual void OnMouseReleased(const MouseEvent& e, bool canceled);
- virtual void OnMouseMoved(const MouseEvent& e);
- virtual void SetMouseHandler(View* new_mouse_handler);
+ virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE;
+ virtual const Widget* GetWidget() const OVERRIDE;
+ virtual Widget* GetWidget() OVERRIDE;
+ virtual bool OnMousePressed(const MouseEvent& e) OVERRIDE;
+ virtual bool OnMouseDragged(const MouseEvent& e) OVERRIDE;
+ virtual void OnMouseReleased(const MouseEvent& e, bool canceled) OVERRIDE;
+ virtual void OnMouseMoved(const MouseEvent& e) OVERRIDE;
+ virtual void SetMouseHandler(View* new_mouse_handler) OVERRIDE;
#if defined(TOUCH_UI)
- virtual TouchStatus OnTouchEvent(const TouchEvent& e);
+ virtual TouchStatus OnTouchEvent(const TouchEvent& e) OVERRIDE;
#endif
- virtual bool IsVisibleInRootView() const;
- virtual std::string GetClassName() const;
- virtual AccessibilityTypes::Role GetAccessibleRole();
+ virtual bool IsVisibleInRootView() const OVERRIDE;
+ virtual std::string GetClassName() const OVERRIDE;
+ virtual AccessibilityTypes::Role GetAccessibleRole() OVERRIDE;
protected:
// Overridden from View:
- virtual void OnPaint(gfx::Canvas* canvas);
- virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child);
+ virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void ViewHierarchyChanged(bool is_add, View* parent,
+ View* child) OVERRIDE;
private:
friend class View;
@@ -153,8 +142,8 @@ class RootView : public View,
// Convert a point to our current mouse handler. Returns false if the
// mouse handler is not connected to a Widget. In that case, the
- // conversion cannot take place and *p is unchanged
- bool ConvertPointToMouseHandler(const gfx::Point& l, gfx::Point *p);
+ // conversion cannot take place and |p| is unchanged
+ bool ConvertPointToMouseHandler(const gfx::Point& l, gfx::Point* p);
// Input ---------------------------------------------------------------------
@@ -163,9 +152,6 @@ class RootView : public View,
// cursor during drag operations.
void UpdateCursor(const MouseEvent& e);
- // Sets the current cursor, or resets it to the last one if NULL is provided.
- void SetActiveCursor(gfx::NativeCursor cursor);
-
// Updates the last_mouse_* fields from e.
void SetMouseLocationAndFlags(const MouseEvent& e);
@@ -191,12 +177,6 @@ class RootView : public View,
// true if mouse_handler_ has been explicitly set
bool explicit_mouse_handler_;
- // Previous cursor
- gfx::NativeCursor previous_cursor_;
-
- // Default keyboard handler
- View* default_keyboard_handler_;
-
// Last position/flag of a mouse press/drag. Used if capture stops and we need
// to synthesize a release.
int last_mouse_event_flags_;
@@ -216,14 +196,6 @@ class RootView : public View,
// The focus search algorithm.
FocusSearch focus_search_;
- // Whether this root view should make our hwnd focused
- // when an unprocessed mouse press event occurs
- bool focus_on_mouse_pressed_;
-
- // Flag used to ignore focus events when we focus the native window associated
- // with a view.
- bool ignore_set_focus_calls_;
-
// Whether this root view belongs to the current active window.
// bool activated_;
diff --git a/views/widget/widget.h b/views/widget/widget.h
index d27dcd8..344c26a 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -239,6 +239,8 @@ class Widget {
virtual View* GetDraggedView() = 0;
virtual void SchedulePaintInRect(const gfx::Rect& rect) = 0;
+
+ virtual void SetCursor(gfx::NativeCursor cursor) = 0;
};
} // namespace views
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc
index a014158..e129a25 100644
--- a/views/widget/widget_gtk.cc
+++ b/views/widget/widget_gtk.cc
@@ -32,6 +32,15 @@
#include "views/widget/widget_utils.h"
#include "views/window/window_gtk.h"
+#if defined(TOUCH_UI)
+#if defined(HAVE_XINPUT2)
+#include <gdk/gdkx.h>
+
+#include "ui/gfx/gtk_util.h"
+#include "views/touchui/touch_factory.h"
+#endif
+#endif
+
using ui::OSExchangeData;
using ui::OSExchangeDataProviderGtk;
using ui::ActiveWindowWatcherX;
@@ -880,6 +889,14 @@ void WidgetGtk::SchedulePaintInRect(const gfx::Rect& rect) {
}
}
+void WidgetGtk::SetCursor(gfx::NativeCursor cursor) {
+#if defined(TOUCH_UI) && defined(HAVE_XINPUT2)
+ if (!TouchFactory::GetInstance()->is_cursor_visible())
+ cursor = gfx::GetCursor(GDK_BLANK_CURSOR);
+#endif
+ gdk_window_set_cursor(widget_->window, cursor);
+}
+
////////////////////////////////////////////////////////////////////////////////
// WidgetGtk, FocusTraversable implementation:
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h
index 44c922a..2b8822a 100644
--- a/views/widget/widget_gtk.h
+++ b/views/widget/widget_gtk.h
@@ -198,6 +198,7 @@ class WidgetGtk
int operation);
virtual View* GetDraggedView();
virtual void SchedulePaintInRect(const gfx::Rect& rect);
+ virtual void SetCursor(gfx::NativeCursor cursor);
// Overridden from FocusTraversable:
virtual FocusSearch* GetFocusSearch();
diff --git a/views/widget/widget_impl.cc b/views/widget/widget_impl.cc
index 365b5b3..ec4dceb 100644
--- a/views/widget/widget_impl.cc
+++ b/views/widget/widget_impl.cc
@@ -117,6 +117,10 @@ void WidgetImpl::SchedulePaintInRect(const gfx::Rect& invalid_rect) {
native_widget_->SchedulePaintInRect(invalid_rect);
}
+void WidgetImpl::SetCursor(gfx::NativeCursor cursor) {
+ native_widget_->SetCursor(cursor);
+}
+
ThemeProvider* WidgetImpl::GetThemeProvider() const {
return NULL;
}
diff --git a/views/widget/widget_impl.h b/views/widget/widget_impl.h
index 491d04b..ad0f8b8 100644
--- a/views/widget/widget_impl.h
+++ b/views/widget/widget_impl.h
@@ -87,6 +87,8 @@ class WidgetImpl : public internal::NativeWidgetListener,
// WidgetImpl.
void SchedulePaintInRect(const gfx::Rect& rect);
+ void SetCursor(gfx::NativeCursor cursor);
+
// Returns a ThemeProvider that can be used to provide resources when
// rendering Views associated with this WidgetImpl.
ThemeProvider* GetThemeProvider() const;
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index ae84d31..ebe890e 100644
--- a/views/widget/widget_win.cc
+++ b/views/widget/widget_win.cc
@@ -89,7 +89,8 @@ WidgetWin::WidgetWin()
delegate_(NULL),
accessibility_view_events_index_(-1),
accessibility_view_events_(kMaxAccessibilityViewEvents),
- dragged_view_(NULL) {
+ dragged_view_(NULL),
+ previous_cursor_(NULL) {
}
WidgetWin::~WidgetWin() {
@@ -509,6 +510,15 @@ void WidgetWin::SchedulePaintInRect(const gfx::Rect& rect) {
InvalidateRect(hwnd(), &r, FALSE);
}
+void WidgetWin::SetCursor(gfx::NativeCursor cursor) {
+ if (cursor) {
+ previous_cursor_ = ::SetCursor(cursor);
+ } else if (previous_cursor_) {
+ ::SetCursor(previous_cursor_);
+ previous_cursor_ = NULL;
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////
// MessageLoop::Observer
diff --git a/views/widget/widget_win.h b/views/widget/widget_win.h
index a1d8fc1..8eb8ff2 100644
--- a/views/widget/widget_win.h
+++ b/views/widget/widget_win.h
@@ -251,6 +251,7 @@ class WidgetWin : public ui::WindowImpl,
int operation);
virtual View* GetDraggedView();
virtual void SchedulePaintInRect(const gfx::Rect& rect);
+ virtual void SetCursor(gfx::NativeCursor cursor);
// Overridden from MessageLoop::Observer:
void WillProcessMessage(const MSG& msg);
@@ -606,6 +607,10 @@ class WidgetWin : public ui::WindowImpl,
// view the drag started from.
View* dragged_view_;
+ // The last cursor that was active before the current one was selected. Saved
+ // so that we can restore it.
+ gfx::NativeCursor previous_cursor_;
+
ViewProps props_;
DISALLOW_COPY_AND_ASSIGN(WidgetWin);