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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 struct SurfaceSequence; | 56 struct SurfaceSequence; |
57 } // namespace cc | 57 } // namespace cc |
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 RenderFrameHostImpl; |
66 class RenderViewHostImpl; | 67 class RenderViewHostImpl; |
67 class RenderWidgetHost; | 68 class RenderWidgetHost; |
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_* |
(...skipping 196 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 RenderFrameHost embedding/containing the BrowserPlugin. |
| 284 RenderFrameHostImpl* GetEmbedderFrame() 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 // Weak pointer used to ask GeolocationPermissionContext about geolocation | 463 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
460 // permission. | 464 // permission. |
461 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | 465 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
462 | 466 |
463 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 467 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
464 }; | 468 }; |
465 | 469 |
466 } // namespace content | 470 } // namespace content |
467 | 471 |
468 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 472 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
OLD | NEW |