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. It has a | 9 // BrowserPluginGuest lives on the UI thread of the browser process. It has a |
10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The | 10 // helper, BrowserPluginGuestHelper, which is a RenderViewHostObserver. The |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 class WebInputEvent; | 61 class WebInputEvent; |
62 } | 62 } |
63 | 63 |
64 namespace content { | 64 namespace content { |
65 | 65 |
66 class BrowserPluginHostFactory; | 66 class BrowserPluginHostFactory; |
67 class BrowserPluginEmbedder; | 67 class BrowserPluginEmbedder; |
68 class BrowserPluginGuestManager; | 68 class BrowserPluginGuestManager; |
69 class RenderProcessHost; | 69 class RenderProcessHost; |
70 class RenderWidgetHostView; | 70 class RenderWidgetHostView; |
71 class SiteInstance; | |
71 struct DropData; | 72 struct DropData; |
72 struct MediaStreamRequest; | 73 struct MediaStreamRequest; |
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 // |
78 // When a guest is initially created, it is in an unattached state. That is, | 79 // When a guest is initially created, it is in an unattached state. That is, |
79 // it is not visible anywhere and has no embedder WebContents assigned. | 80 // it is not visible anywhere and has no embedder WebContents assigned. |
80 // A BrowserPluginGuest is said to be "attached" if it has an embedder. | 81 // A BrowserPluginGuest is said to be "attached" if it has an embedder. |
81 // A BrowserPluginGuest can also create a new unattached guest via | 82 // A BrowserPluginGuest can also create a new unattached guest via |
82 // CreateNewWindow. The newly created guest will live in the same partition, | 83 // CreateNewWindow. The newly created guest will live in the same partition, |
83 // which means it can share storage and can script this guest. | 84 // which means it can share storage and can script this guest. |
84 class CONTENT_EXPORT BrowserPluginGuest | 85 class CONTENT_EXPORT BrowserPluginGuest |
85 : public JavaScriptDialogManager, | 86 : public JavaScriptDialogManager, |
86 public WebContentsDelegate, | 87 public WebContentsDelegate, |
87 public WebContentsObserver, | 88 public WebContentsObserver, |
88 public base::SupportsWeakPtr<BrowserPluginGuest> { | 89 public base::SupportsWeakPtr<BrowserPluginGuest> { |
89 public: | 90 public: |
90 typedef base::Callback<void(bool)> GeolocationCallback; | 91 typedef base::Callback<void(bool)> GeolocationCallback; |
91 virtual ~BrowserPluginGuest(); | 92 virtual ~BrowserPluginGuest(); |
92 | 93 |
93 static BrowserPluginGuest* Create( | 94 static BrowserPluginGuest* Create( |
94 int instance_id, | 95 int instance_id, |
96 SiteInstance* site_instance, | |
Charlie Reis
2013/10/30 20:42:20
It's not clear which SiteInstance this is expectin
| |
95 WebContentsImpl* web_contents, | 97 WebContentsImpl* web_contents, |
96 scoped_ptr<base::DictionaryValue> extra_params); | 98 scoped_ptr<base::DictionaryValue> extra_params); |
97 | 99 |
98 static BrowserPluginGuest* CreateWithOpener( | 100 static BrowserPluginGuest* CreateWithOpener( |
99 int instance_id, | 101 int instance_id, |
100 WebContentsImpl* web_contents, | 102 WebContentsImpl* web_contents, |
101 BrowserPluginGuest* opener, | 103 BrowserPluginGuest* opener, |
102 bool has_render_view); | 104 bool has_render_view); |
103 | 105 |
104 // Called when the embedder WebContents is destroyed to give the | 106 // Called when the embedder WebContents is destroyed to give the |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
545 // These are parameters passed from JavaScript on attachment to the content | 547 // These are parameters passed from JavaScript on attachment to the content |
546 // embedder. | 548 // embedder. |
547 scoped_ptr<base::DictionaryValue> extra_attach_params_; | 549 scoped_ptr<base::DictionaryValue> extra_attach_params_; |
548 | 550 |
549 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 551 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
550 }; | 552 }; |
551 | 553 |
552 } // namespace content | 554 } // namespace content |
553 | 555 |
554 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 556 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
OLD | NEW |