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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 // GuestHost implementation. | 175 // GuestHost implementation. |
176 int LoadURLWithParams( | 176 int LoadURLWithParams( |
177 const NavigationController::LoadURLParams& load_params) override; | 177 const NavigationController::LoadURLParams& load_params) override; |
178 void SizeContents(const gfx::Size& new_size) override; | 178 void SizeContents(const gfx::Size& new_size) override; |
179 void WillDestroy() override; | 179 void WillDestroy() override; |
180 | 180 |
181 // Exposes the protected web_contents() from WebContentsObserver. | 181 // Exposes the protected web_contents() from WebContentsObserver. |
182 WebContentsImpl* GetWebContents() const; | 182 WebContentsImpl* GetWebContents() const; |
183 | 183 |
184 gfx::Point GetScreenCoordinates(const gfx::Point& relative_position) const; | 184 gfx::Point GetScreenCoordinates(const gfx::Point& relative_position) const; |
| 185 gfx::PointF GetScreenCoordinates(const gfx::PointF& relative_position) const; |
185 | 186 |
186 // Helper to send messages to embedder. If this guest is not yet attached, | 187 // Helper to send messages to embedder. If this guest is not yet attached, |
187 // then IPCs will be queued until attachment. | 188 // then IPCs will be queued until attachment. |
188 void SendMessageToEmbedder(IPC::Message* msg); | 189 void SendMessageToEmbedder(IPC::Message* msg); |
189 | 190 |
190 // Returns whether the guest is attached to an embedder. | 191 // Returns whether the guest is attached to an embedder. |
191 bool attached() const { return attached_; } | 192 bool attached() const { return attached_; } |
192 | 193 |
193 // Attaches this BrowserPluginGuest to the provided |embedder_web_contents| | 194 // Attaches this BrowserPluginGuest to the provided |embedder_web_contents| |
194 // and initializes the guest with the provided |params|. Attaching a guest | 195 // and initializes the guest with the provided |params|. Attaching a guest |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 // Weak pointer used to ask GeolocationPermissionContext about geolocation | 438 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
438 // permission. | 439 // permission. |
439 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | 440 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
440 | 441 |
441 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 442 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
442 }; | 443 }; |
443 | 444 |
444 } // namespace content | 445 } // namespace content |
445 | 446 |
446 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 447 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
OLD | NEW |