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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.h

Issue 1293963002: Fixing the Position of Context Menu for BrowserPlugin (<webview>) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Test Name Created 5 years, 4 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: content/browser/browser_plugin/browser_plugin_guest.h
diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h
index 868fcc8a35ab07c5920b2e70f48a9c25ceca03b3..ab2e19e76c33e71c5327f75c3c40bacd8b08b040 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.h
+++ b/content/browser/browser_plugin/browser_plugin_guest.h
@@ -187,6 +187,17 @@ class CONTENT_EXPORT BrowserPluginGuest : public GuestHost,
gfx::Point GetScreenCoordinates(const gfx::Point& relative_position) const;
+ // This method is called by the RenderWidgetHostViewGuest to inform the
+ // BrowserPlugin of the potential location of the context menu event (to
+ // come). The need for this (hack) is that the input events when passed on to
+ // the BrowserPlugin are modified by any CSS transforms applied on the plugin.
+ // Therefore, the coordinates of the context menu event with respect to the
+ // container window are modifed with the guest renderer process beiung unaware
+ // of the change. Then eventually, when the context menu event arrives at the
+ // browser, it contains the wrong coordinates (BUG=470087).
+ // TODO(ekaramad): Find a more fundamental solution and remove this later.
+ void SetContextMenuPosition(const gfx::Point& position);
+
// Helper to send messages to embedder. If this guest is not yet attached,
// then IPCs will be queued until attachment.
void SendMessageToEmbedder(IPC::Message* msg);

Powered by Google App Engine
This is Rietveld 408576698