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 BrowserPluginEmbedder handles messages coming from a BrowserPlugin's | 5 // A BrowserPluginEmbedder handles messages coming from a BrowserPlugin's |
6 // embedder that are not directed at any particular existing guest process. | 6 // embedder that are not directed at any particular existing guest process. |
7 // In the beginning, when a BrowserPlugin instance in the embedder renderer | 7 // In the beginning, when a BrowserPlugin instance in the embedder renderer |
8 // process requests an initial navigation, the WebContents for that renderer | 8 // process requests an initial navigation, the WebContents for that renderer |
9 // renderer creates a BrowserPluginEmbedder for itself. The | 9 // renderer creates a BrowserPluginEmbedder for itself. The |
10 // BrowserPluginEmbedder, in turn, forwards the requests to a | 10 // BrowserPluginEmbedder, in turn, forwards the requests to a |
11 // BrowserPluginGuestManager, which creates and manages the lifetime of the new | 11 // BrowserPluginGuestManager, which creates and manages the lifetime of the new |
12 // guest. | 12 // guest. |
13 | 13 |
14 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ | 14 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ |
15 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ | 15 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ |
16 | 16 |
17 #include "base/macros.h" | 17 #include "base/macros.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
20 #include "content/public/browser/web_contents_observer.h" | 20 #include "content/public/browser/web_contents_observer.h" |
21 #include "third_party/WebKit/public/platform/WebDragOperation.h" | 21 #include "third_party/WebKit/public/platform/WebDragOperation.h" |
22 | 22 |
23 struct BrowserPluginHostMsg_Attach_Params; | 23 struct BrowserPluginHostMsg_Attach_Params; |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 | 26 |
27 class BrowserPluginGuest; | 27 class BrowserPluginGuest; |
28 class BrowserPluginGuestManager; | 28 class BrowserPluginGuestManager; |
29 class RenderWidgetHostImpl; | |
30 struct NativeWebKeyboardEvent; | 29 struct NativeWebKeyboardEvent; |
31 | 30 |
32 class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver { | 31 class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver { |
33 public: | 32 public: |
34 ~BrowserPluginEmbedder() override; | 33 ~BrowserPluginEmbedder() override; |
35 | 34 |
36 static BrowserPluginEmbedder* Create(WebContentsImpl* web_contents); | 35 static BrowserPluginEmbedder* Create(WebContentsImpl* web_contents); |
37 | 36 |
38 // Called when embedder's |rwh| has sent screen rects to renderer. | 37 // Called when embedder's |rwh| has sent screen rects to renderer. |
39 void DidSendScreenRects(); | 38 void DidSendScreenRects(); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 bool guest_drag_ending_; | 134 bool guest_drag_ending_; |
136 | 135 |
137 base::WeakPtrFactory<BrowserPluginEmbedder> weak_ptr_factory_; | 136 base::WeakPtrFactory<BrowserPluginEmbedder> weak_ptr_factory_; |
138 | 137 |
139 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); | 138 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); |
140 }; | 139 }; |
141 | 140 |
142 } // namespace content | 141 } // namespace content |
143 | 142 |
144 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ | 143 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ |
OLD | NEW |