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

Unified Diff: chrome/renderer/render_widget.h

Issue 647047: Do not send extra blur and focus events if popup menu is showing... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | chrome/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_widget.h
===================================================================
--- chrome/renderer/render_widget.h (revision 38812)
+++ chrome/renderer/render_widget.h (working copy)
@@ -101,6 +101,10 @@
// Close the underlying WebWidget.
virtual void Close();
+ // Set owner widget who creates this popup menu. This is used to inform
+ // owner that popup menu is closed.
+ void SetPopupMenuOwnerWidget(RenderWidget* widget);
+
protected:
// Friend RefCounted so that the dtor can be non-public. Using this class
// without ref-counting is an error.
@@ -200,6 +204,9 @@
// just handled.
virtual void DidHandleKeyEvent() {}
+ // Reset the popup menu state when it is closed.
+ void PopupMenuClosed();
+
// Routing ID that allows us to communicate to the parent browser process
// RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent.
int32 routing_id_;
@@ -311,6 +318,15 @@
// Indicates if the next sequence of Char events should be suppressed or not.
bool suppress_next_char_events_;
+ // These are for popup menu so the focus and blur events can be dispatched
+ // properly.
+ //
+ // Whether this RenderWidget is showing a popup menu widget.
+ bool showing_popup_menu_;
+ // This is for popup menu RenderWidget to remember its owner so it could
+ // inform the owner that popup menu is closed.
+ scoped_refptr<RenderWidget> popup_menu_owner_widget_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidget);
};
« no previous file with comments | « chrome/renderer/render_view.cc ('k') | chrome/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698