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 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_OLD_BROWSER_PLUGIN_HOST_H__ | 5 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_OLD_OLD_BROWSER_PLUGIN_HOST_H__ |
6 #define CONTENT_BROWSER_BROWSER_PLUGIN_OLD_BROWSER_PLUGIN_HOST_H__ | 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_OLD_OLD_BROWSER_PLUGIN_HOST_H__ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "content/public/browser/notification_observer.h" | 11 #include "content/public/browser/notification_observer.h" |
12 #include "content/public/browser/notification_registrar.h" | 12 #include "content/public/browser/notification_registrar.h" |
13 #include "content/public/browser/web_contents_delegate.h" | 13 #include "content/public/browser/web_contents_delegate.h" |
14 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
15 #include "ppapi/c/pp_instance.h" | 15 #include "ppapi/c/pp_instance.h" |
16 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
(...skipping 10 matching lines...) Expand all Loading... | |
27 | 27 |
28 namespace old { | 28 namespace old { |
29 | 29 |
30 | 30 |
31 // A BrowserPluginHost object is used by both embedders and guests. | 31 // A BrowserPluginHost object is used by both embedders and guests. |
32 // The primary purpose of BrowserPluginHost is to allow an embedder | 32 // The primary purpose of BrowserPluginHost is to allow an embedder |
33 // to manage the lifetime of its guests. It cleans up its guests | 33 // to manage the lifetime of its guests. It cleans up its guests |
34 // on navigation, crashes, and "hides" guests when it hides. | 34 // on navigation, crashes, and "hides" guests when it hides. |
35 // For the guest, BrowserPluginHost keeps track of its embedder, | 35 // For the guest, BrowserPluginHost keeps track of its embedder, |
36 // and its BrowserPlugin instance ID. | 36 // and its BrowserPlugin instance ID. |
37 class BrowserPluginHost : public WebContentsObserver, | 37 class BrowserPluginHost : public WebContentsObserver, |
Charlie Reis
2012/08/07 23:58:29
I suppose we don't need to rename the class itself
| |
38 public NotificationObserver, | 38 public NotificationObserver, |
39 public WebContentsDelegate { | 39 public WebContentsDelegate { |
40 public: | 40 public: |
41 // BrowserPluginHost is owned by a WebContentsImpl. Here it takes in its | 41 // BrowserPluginHost is owned by a WebContentsImpl. Here it takes in its |
42 // owner. The owner can be either a guest or embedder WebContents. | 42 // owner. The owner can be either a guest or embedder WebContents. |
43 explicit BrowserPluginHost(WebContentsImpl* web_contents); | 43 explicit BrowserPluginHost(WebContentsImpl* web_contents); |
44 | 44 |
45 virtual ~BrowserPluginHost(); | 45 virtual ~BrowserPluginHost(); |
46 | 46 |
47 void ConnectEmbedderToChannel(RenderViewHost* render_view_host, | 47 void ConnectEmbedderToChannel(RenderViewHost* render_view_host, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 int instance_id_; | 126 int instance_id_; |
127 GuestMap guests_; | 127 GuestMap guests_; |
128 ContainerInstanceMap guests_by_container_id_; | 128 ContainerInstanceMap guests_by_container_id_; |
129 | 129 |
130 DISALLOW_COPY_AND_ASSIGN(BrowserPluginHost); | 130 DISALLOW_COPY_AND_ASSIGN(BrowserPluginHost); |
131 }; | 131 }; |
132 | 132 |
133 } // namespace old | 133 } // namespace old |
134 } // namespace content | 134 } // namespace content |
135 | 135 |
136 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_OLD_BROWSER_PLUGIN_HOST_H_ | 136 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_OLD_OLD_BROWSER_PLUGIN_HOST_H_ |
OLD | NEW |