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

Unified Diff: views/widget/widget.h

Issue 6756043: Consolidate Widget Event code, other cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Additional code consolidation, move base defs, nix MakeMSG, TooltipManager cleanup, etc. 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.h
diff --git a/views/widget/widget.h b/views/widget/widget.h
index b0e22a31abfbf462ae2500bdc8b58bd504e9e49f..d44885e5c9037211e5f5b8c545729e800800471f 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -274,6 +274,8 @@ class Widget : public internal::NativeWidgetDelegate,
virtual void OnSizeChanged(const gfx::Size& new_size) OVERRIDE;
virtual bool HasFocusManager() const OVERRIDE;
virtual void OnNativeWidgetPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual bool OnMouseEvent(const MouseEvent& event) OVERRIDE;
+ virtual void OnMouseCaptureLost() OVERRIDE;
// Overridden from FocusTraversable:
virtual FocusSearch* GetFocusSearch() OVERRIDE;
@@ -300,6 +302,17 @@ class Widget : public internal::NativeWidgetDelegate,
// Used for testing.
void ReplaceFocusManager(FocusManager* focus_manager);
+ // TODO(msw): Make this mouse state member private.
+ // If true, the mouse is currently down.
+ bool is_mouse_button_pressed_;
+
+ // TODO(msw): Make these mouse state members private.
+ // 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.
+ bool last_mouse_event_was_move_;
+ gfx::Point last_mouse_event_position_;
+
private:
// Refresh the compositor tree. This is called by a View whenever its texture
// is updated.

Powered by Google App Engine
This is Rietveld 408576698