| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 namespace gfx { | 59 namespace gfx { |
| 60 class Range; | 60 class Range; |
| 61 } // namespace gfx | 61 } // namespace gfx |
| 62 | 62 |
| 63 namespace content { | 63 namespace content { |
| 64 | 64 |
| 65 class BrowserPluginGuestManager; | 65 class BrowserPluginGuestManager; |
| 66 class RenderViewHostImpl; | 66 class RenderViewHostImpl; |
| 67 class RenderWidgetHost; | 67 class RenderWidgetHost; |
| 68 class RenderWidgetHostImpl; |
| 68 class RenderWidgetHostView; | 69 class RenderWidgetHostView; |
| 69 class RenderWidgetHostViewBase; | 70 class RenderWidgetHostViewBase; |
| 70 class SiteInstance; | 71 class SiteInstance; |
| 71 struct DropData; | 72 struct DropData; |
| 72 struct TextInputState; | 73 struct TextInputState; |
| 73 | 74 |
| 74 // A browser plugin guest provides functionality for WebContents to operate in | 75 // A browser plugin guest provides functionality for WebContents to operate in |
| 75 // the guest role and implements guest-specific overrides for ViewHostMsg_* | 76 // the guest role and implements guest-specific overrides for ViewHostMsg_* |
| 76 // messages. | 77 // messages. |
| 77 // | 78 // |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 has_attached_since_surface_set_ = has_attached; | 273 has_attached_since_surface_set_ = has_attached; |
| 273 } | 274 } |
| 274 | 275 |
| 275 void set_attached_for_test(bool attached) { | 276 void set_attached_for_test(bool attached) { |
| 276 attached_ = attached; | 277 attached_ = attached; |
| 277 } | 278 } |
| 278 | 279 |
| 279 private: | 280 private: |
| 280 class EmbedderVisibilityObserver; | 281 class EmbedderVisibilityObserver; |
| 281 | 282 |
| 283 // The RenderWidgetHostImpl corresponding to the owner frame of BrowserPlugin. |
| 284 RenderWidgetHostImpl* GetOwnerRenderWidgetHost() const; |
| 285 |
| 282 void InitInternal(const BrowserPluginHostMsg_Attach_Params& params, | 286 void InitInternal(const BrowserPluginHostMsg_Attach_Params& params, |
| 283 WebContentsImpl* owner_web_contents); | 287 WebContentsImpl* owner_web_contents); |
| 284 | 288 |
| 285 void OnSatisfySequence(int instance_id, const cc::SurfaceSequence& sequence); | 289 void OnSatisfySequence(int instance_id, const cc::SurfaceSequence& sequence); |
| 286 void OnRequireSequence(int instance_id, | 290 void OnRequireSequence(int instance_id, |
| 287 const cc::SurfaceId& id, | 291 const cc::SurfaceId& id, |
| 288 const cc::SurfaceSequence& sequence); | 292 const cc::SurfaceSequence& sequence); |
| 289 // Message handlers for messages from embedder. | 293 // Message handlers for messages from embedder. |
| 290 void OnDetach(int instance_id); | 294 void OnDetach(int instance_id); |
| 291 // Handles drag events from the embedder. | 295 // Handles drag events from the embedder. |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 // Weak pointer used to ask GeolocationPermissionContext about geolocation | 464 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
| 461 // permission. | 465 // permission. |
| 462 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | 466 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
| 463 | 467 |
| 464 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 468 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
| 465 }; | 469 }; |
| 466 | 470 |
| 467 } // namespace content | 471 } // namespace content |
| 468 | 472 |
| 469 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 473 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
| OLD | NEW |