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

Side by Side 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 a Build Error in MAC Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // A BrowserPluginGuest is the browser side of a browser <--> embedder 5 // A BrowserPluginGuest is the browser side of a browser <--> embedder
6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder 6 // renderer channel. A BrowserPlugin (a WebPlugin) is on the embedder
7 // renderer side of browser <--> embedder renderer communication. 7 // renderer side of browser <--> embedder renderer communication.
8 // 8 //
9 // BrowserPluginGuest lives on the UI thread of the browser process. Any 9 // BrowserPluginGuest lives on the UI thread of the browser process. Any
10 // messages about the guest render process that the embedder might be interested 10 // messages about the guest render process that the embedder might be interested
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 int LoadURLWithParams( 180 int LoadURLWithParams(
181 const NavigationController::LoadURLParams& load_params) override; 181 const NavigationController::LoadURLParams& load_params) override;
182 void SizeContents(const gfx::Size& new_size) override; 182 void SizeContents(const gfx::Size& new_size) override;
183 void WillDestroy() override; 183 void WillDestroy() override;
184 184
185 // Exposes the protected web_contents() from WebContentsObserver. 185 // Exposes the protected web_contents() from WebContentsObserver.
186 WebContentsImpl* GetWebContents() const; 186 WebContentsImpl* GetWebContents() const;
187 187
188 gfx::Point GetScreenCoordinates(const gfx::Point& relative_position) const; 188 gfx::Point GetScreenCoordinates(const gfx::Point& relative_position) const;
189 189
190 // This method is called by the RenderWidgetHostViewGuest to inform the
191 // BrowserPlugin of the potential location of the context menu event (to
192 // come). The need for this (hack) is that the input events when passed on to
193 // the BrowserPlugin are modified by any CSS transforms applied on the plugin.
194 // Therefore, the coordinates of the context menu event with respect to the
195 // container window are modifed with the guest renderer process beiung unaware
196 // of the change. Then eventually, when the context menu event arrives at the
197 // browser, it contains the wrong coordinates (BUG=470087).
198 // TODO(ekaramad): Find a more fundamental solution and remove this later.
199 void SetContextMenuPosition(const gfx::Point& position);
200
190 // Helper to send messages to embedder. If this guest is not yet attached, 201 // Helper to send messages to embedder. If this guest is not yet attached,
191 // then IPCs will be queued until attachment. 202 // then IPCs will be queued until attachment.
192 void SendMessageToEmbedder(IPC::Message* msg); 203 void SendMessageToEmbedder(IPC::Message* msg);
193 204
194 // Returns whether the guest is attached to an embedder. 205 // Returns whether the guest is attached to an embedder.
195 bool attached() const { return attached_; } 206 bool attached() const { return attached_; }
196 207
197 // Returns true when an attachment has taken place since the last time the 208 // Returns true when an attachment has taken place since the last time the
198 // compositor surface was set. 209 // compositor surface was set.
199 bool has_attached_since_surface_set() const { 210 bool has_attached_since_surface_set() const {
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 // Weak pointer used to ask GeolocationPermissionContext about geolocation 467 // Weak pointer used to ask GeolocationPermissionContext about geolocation
457 // permission. 468 // permission.
458 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; 469 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_;
459 470
460 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 471 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
461 }; 472 };
462 473
463 } // namespace content 474 } // namespace content
464 475
465 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 476 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW
« no previous file with comments | « components/guest_view/browser/guest_view_base.cc ('k') | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698