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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // A browser plugin guest provides functionality for WebContents to operate in | 70 // A browser plugin guest provides functionality for WebContents to operate in |
71 // the guest role and implements guest-specific overrides for ViewHostMsg_* | 71 // the guest role and implements guest-specific overrides for ViewHostMsg_* |
72 // messages. | 72 // messages. |
73 // | 73 // |
74 // When a guest is initially created, it is in an unattached state. That is, | 74 // When a guest is initially created, it is in an unattached state. That is, |
75 // it is not visible anywhere and has no embedder WebContents assigned. | 75 // it is not visible anywhere and has no embedder WebContents assigned. |
76 // A BrowserPluginGuest is said to be "attached" if it has an embedder. | 76 // A BrowserPluginGuest is said to be "attached" if it has an embedder. |
77 // A BrowserPluginGuest can also create a new unattached guest via | 77 // A BrowserPluginGuest can also create a new unattached guest via |
78 // CreateNewWindow. The newly created guest will live in the same partition, | 78 // CreateNewWindow. The newly created guest will live in the same partition, |
79 // which means it can share storage and can script this guest. | 79 // which means it can share storage and can script this guest. |
| 80 // |
| 81 // Note: in --site-per-process, all IPCs sent out from this class will be |
| 82 // dropped on the floor since we don't have a BrowserPlugin. |
80 class CONTENT_EXPORT BrowserPluginGuest : public GuestHost, | 83 class CONTENT_EXPORT BrowserPluginGuest : public GuestHost, |
81 public WebContentsObserver { | 84 public WebContentsObserver { |
82 public: | 85 public: |
83 ~BrowserPluginGuest() override; | 86 ~BrowserPluginGuest() override; |
84 | 87 |
85 // The WebContents passed into the factory method here has not been | 88 // The WebContents passed into the factory method here has not been |
86 // initialized yet and so it does not yet hold a SiteInstance. | 89 // initialized yet and so it does not yet hold a SiteInstance. |
87 // BrowserPluginGuest must be constructed and installed into a WebContents | 90 // BrowserPluginGuest must be constructed and installed into a WebContents |
88 // prior to its initialization because WebContents needs to determine what | 91 // prior to its initialization because WebContents needs to determine what |
89 // type of WebContentsView to construct on initialization. The content | 92 // type of WebContentsView to construct on initialization. The content |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 // Weak pointer used to ask GeolocationPermissionContext about geolocation | 424 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
422 // permission. | 425 // permission. |
423 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | 426 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
424 | 427 |
425 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 428 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
426 }; | 429 }; |
427 | 430 |
428 } // namespace content | 431 } // namespace content |
429 | 432 |
430 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 433 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
OLD | NEW |