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