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

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: 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.h
diff --git a/views/widget/widget.h b/views/widget/widget.h
index b0e22a31abfbf462ae2500bdc8b58bd504e9e49f..a2b2727525eaa8035956d8e8c38bda598904b93b 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -297,9 +297,26 @@ class Widget : public internal::NativeWidgetDelegate,
native_widget_ = native_widget;
}
+ // 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(const MouseEvent& event);
Ben Goodger (Google) 2011/03/30 23:22:55 I want you to rename these methods: OnMousePresse
msw 2011/03/31 14:01:18 Done.
+ bool ProcessMouseReleased(const MouseEvent& event);
+ void ProcessMouseMoved(const MouseEvent& event);
+ void ProcessMouseCaptureLost();
+
// Used for testing.
void ReplaceFocusManager(FocusManager* focus_manager);
+ // If true, the mouse is currently down.
Ben Goodger (Google) 2011/03/30 23:22:55 Can you add a TODO to move these to private:?
msw 2011/03/31 14:01:18 Done.
+ bool is_mouse_down_;
+
+ // 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.
« no previous file with comments | « views/widget/native_widget.h ('k') | views/widget/widget.cc » ('j') | views/widget/widget_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698