| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 // by its opener, and it can begin loading resources. |extra_params| are | 285 // by its opener, and it can begin loading resources. |extra_params| are |
| 286 // parameters passed into BrowserPlugin from JavaScript to be forwarded to | 286 // parameters passed into BrowserPlugin from JavaScript to be forwarded to |
| 287 // the content embedder. | 287 // the content embedder. |
| 288 void Attach(WebContentsImpl* embedder_web_contents, | 288 void Attach(WebContentsImpl* embedder_web_contents, |
| 289 BrowserPluginHostMsg_Attach_Params params, | 289 BrowserPluginHostMsg_Attach_Params params, |
| 290 const base::DictionaryValue& extra_params); | 290 const base::DictionaryValue& extra_params); |
| 291 | 291 |
| 292 // Requests geolocation permission through Embedder JavaScript API. | 292 // Requests geolocation permission through Embedder JavaScript API. |
| 293 void AskEmbedderForGeolocationPermission(int bridge_id, | 293 void AskEmbedderForGeolocationPermission(int bridge_id, |
| 294 const GURL& requesting_frame, | 294 const GURL& requesting_frame, |
| 295 bool user_gesture, |
| 295 const GeolocationCallback& callback); | 296 const GeolocationCallback& callback); |
| 296 // Cancels pending geolocation request. | 297 // Cancels pending geolocation request. |
| 297 void CancelGeolocationRequest(int bridge_id); | 298 void CancelGeolocationRequest(int bridge_id); |
| 298 | 299 |
| 299 // Allow the embedder to call this for unhandled messages when | 300 // Allow the embedder to call this for unhandled messages when |
| 300 // BrowserPluginGuest is already destroyed. | 301 // BrowserPluginGuest is already destroyed. |
| 301 static void AcknowledgeBufferPresent(int route_id, | 302 static void AcknowledgeBufferPresent(int route_id, |
| 302 int gpu_host_id, | 303 int gpu_host_id, |
| 303 const gpu::Mailbox& mailbox, | 304 const gpu::Mailbox& mailbox, |
| 304 uint32 sync_point); | 305 uint32 sync_point); |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 // Weak pointer used to ask GeolocationPermissionContext about geolocation | 624 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
| 624 // permission. | 625 // permission. |
| 625 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | 626 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
| 626 | 627 |
| 627 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 628 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
| 628 }; | 629 }; |
| 629 | 630 |
| 630 } // namespace content | 631 } // namespace content |
| 631 | 632 |
| 632 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 633 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
| OLD | NEW |