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

Unified Diff: views/widget/widget_win.h

Issue 6756043: Consolidate Widget Event code, other cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Consolidate Widget Event code, other cleanup. Created 9 years, 9 months 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: views/widget/widget_win.h
diff --git a/views/widget/widget_win.h b/views/widget/widget_win.h
index 48ac644e56459d887cc105087dfb9c0ee4adfd1e..307c5f32ec95e39504c5eb9d6ad18db2e830be2e 100644
--- a/views/widget/widget_win.h
+++ b/views/widget/widget_win.h
@@ -206,9 +206,10 @@ class WidgetWin : public ui::WindowImpl,
virtual void* GetNativeWindowProperty(const char* name) OVERRIDE;
virtual TooltipManager* GetTooltipManager() const OVERRIDE;
virtual bool IsScreenReaderActive() const OVERRIDE;
- virtual void SetNativeCapture() OVERRIDE;
- virtual void ReleaseNativeCapture() OVERRIDE;
- virtual bool HasNativeCapture() const OVERRIDE;
+ virtual void SetMouseCapture() OVERRIDE;
+ virtual void ReleaseMouseCapture() OVERRIDE;
+ virtual bool HasMouseCapture() const OVERRIDE;
+ virtual bool ShouldReleaseCaptureOnMouseReleased() const OVERRIDE;
virtual gfx::Rect GetWindowScreenBounds() const OVERRIDE;
virtual gfx::Rect GetClientAreaScreenBounds() const OVERRIDE;
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
@@ -246,7 +247,7 @@ class WidgetWin : public ui::WindowImpl,
BEGIN_MSG_MAP_EX(WidgetWin)
// Range handlers must go first!
MESSAGE_RANGE_HANDLER_EX(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseRange)
- MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, OnNCMouseRange)
+ MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCXBUTTONDBLCLK, OnMouseRange)
// Reflected message handler
MESSAGE_HANDLER_EX(kReflectedMessage, OnReflectedMessage)
@@ -266,8 +267,8 @@ class WidgetWin : public ui::WindowImpl,
MESSAGE_HANDLER_EX(WM_MOUSELEAVE, OnMouseLeave)
MESSAGE_HANDLER_EX(WM_MOUSEMOVE, OnMouseMove)
MESSAGE_HANDLER_EX(WM_MOUSEWHEEL, OnMouseWheel)
- MESSAGE_HANDLER_EX(WM_NCMOUSELEAVE, OnNCMouseLeave)
- MESSAGE_HANDLER_EX(WM_NCMOUSEMOVE, OnNCMouseMove)
+ MESSAGE_HANDLER_EX(WM_NCMOUSELEAVE, OnMouseLeave)
+ MESSAGE_HANDLER_EX(WM_NCMOUSEMOVE, OnMouseMove)
// Key events.
MESSAGE_HANDLER_EX(WM_KEYDOWN, OnKeyDown)
@@ -364,9 +365,6 @@ class WidgetWin : public ui::WindowImpl,
virtual LRESULT OnNCActivate(BOOL active);
virtual LRESULT OnNCCalcSize(BOOL w_param, LPARAM l_param);
virtual LRESULT OnNCHitTest(const CPoint& pt);
- virtual LRESULT OnNCMouseLeave(UINT message, WPARAM w_param, LPARAM l_param);
- virtual LRESULT OnNCMouseMove(UINT message, WPARAM w_param, LPARAM l_param);
- virtual LRESULT OnNCMouseRange(UINT message, WPARAM w_param, LPARAM l_param);
virtual void OnNCPaint(HRGN rgn);
virtual LRESULT OnNCUAHDrawCaption(UINT msg,
WPARAM w_param,
@@ -395,21 +393,9 @@ class WidgetWin : public ui::WindowImpl,
// messages too.
void TrackMouseEvents(DWORD mouse_tracking_flags);
- // Actually handle mouse events. These functions are called by subclasses who
- // override the message handlers above to do the actual real work of handling
- // the event in the View system.
- bool ProcessMousePressed(UINT message, WPARAM w_param, LPARAM l_param);
- bool ProcessMouseReleased(UINT message, WPARAM w_param, LPARAM l_param);
- bool ProcessMouseMoved(UINT message, WPARAM w_param, LPARAM l_param);
- void ProcessMouseExited(UINT message, WPARAM w_param, LPARAM l_param);
-
// Called when a MSAA screen reader client is detected.
virtual void OnScreenReaderDetected();
- // Returns whether capture should be released on mouse release. The default
- // is true.
- virtual bool ReleaseCaptureOnMouseReleased();
-
// The TooltipManager.
// WARNING: RootView's destructor calls into the TooltipManager. As such, this
// must be destroyed AFTER root_view_.
@@ -417,9 +403,6 @@ class WidgetWin : public ui::WindowImpl,
scoped_refptr<DropTargetWin> drop_target_;
- // If true, the mouse is currently down.
- bool is_mouse_down_;
-
// Are a subclass of WindowWin?
bool is_window_;
@@ -504,17 +487,6 @@ class WidgetWin : public ui::WindowImpl,
// store if necessary.
bool can_update_layered_window_;
- // The following are used to detect duplicate mouse move events and not
- // deliver them. Displaying a window may result in the system generating
- // duplicate move events even though the mouse hasn't moved.
-
- // If true, the last event was a mouse move event.
- bool last_mouse_event_was_move_;
-
- // Coordinates of the last mouse move event.
- int last_mouse_move_x_;
- int last_mouse_move_y_;
-
// Whether the focus should be restored next time we get enabled. Needed to
// restore focus correctly when Windows modal dialogs are displayed.
bool restore_focus_when_enabled_;

Powered by Google App Engine
This is Rietveld 408576698