Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 180 int LoadURLWithParams( | 180 int LoadURLWithParams( |
| 181 const NavigationController::LoadURLParams& load_params) override; | 181 const NavigationController::LoadURLParams& load_params) override; |
| 182 void GuestResizeDueToAutoResize(const gfx::Size& new_size) override; | 182 void GuestResizeDueToAutoResize(const gfx::Size& new_size) override; |
| 183 void SizeContents(const gfx::Size& new_size) override; | 183 void SizeContents(const gfx::Size& new_size) override; |
| 184 void WillDestroy() override; | 184 void WillDestroy() override; |
| 185 | 185 |
| 186 // Exposes the protected web_contents() from WebContentsObserver. | 186 // Exposes the protected web_contents() from WebContentsObserver. |
| 187 WebContentsImpl* GetWebContents() const; | 187 WebContentsImpl* GetWebContents() const; |
| 188 | 188 |
| 189 gfx::Point GetScreenCoordinates(const gfx::Point& relative_position) const; | 189 gfx::Point GetScreenCoordinates(const gfx::Point& relative_position) const; |
| 190 gfx::PointF GetScreenCoordinates(const gfx::PointF& relative_position) const; | |
|
tdresser
2015/11/02 15:38:24
It's a shame that we need both of these - I assume
wjmaclean
2015/11/02 19:23:10
In the context of this CL, yes. Though worth looki
| |
| 190 | 191 |
| 191 // This method is called by the RenderWidgetHostViewGuest to inform the | 192 // This method is called by the RenderWidgetHostViewGuest to inform the |
| 192 // BrowserPlugin of the potential location of the context menu event (to | 193 // BrowserPlugin of the potential location of the context menu event (to |
| 193 // come). The need for this (hack) is that the input events when passed on to | 194 // come). The need for this (hack) is that the input events when passed on to |
| 194 // the BrowserPlugin are modified by any CSS transforms applied on the plugin. | 195 // the BrowserPlugin are modified by any CSS transforms applied on the plugin. |
| 195 // Therefore, the coordinates of the context menu event with respect to the | 196 // Therefore, the coordinates of the context menu event with respect to the |
| 196 // container window are modifed with the guest renderer process beiung unaware | 197 // container window are modifed with the guest renderer process beiung unaware |
| 197 // of the change. Then eventually, when the context menu event arrives at the | 198 // of the change. Then eventually, when the context menu event arrives at the |
| 198 // browser, it contains the wrong coordinates (BUG=470087). | 199 // browser, it contains the wrong coordinates (BUG=470087). |
| 199 // TODO(ekaramad): Find a more fundamental solution and remove this later. | 200 // TODO(ekaramad): Find a more fundamental solution and remove this later. |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 472 // Weak pointer used to ask GeolocationPermissionContext about geolocation | 473 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
| 473 // permission. | 474 // permission. |
| 474 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | 475 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
| 475 | 476 |
| 476 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 477 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
| 477 }; | 478 }; |
| 478 | 479 |
| 479 } // namespace content | 480 } // namespace content |
| 480 | 481 |
| 481 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 482 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
| OLD | NEW |