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 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 static BrowserPluginEmbedder* Create(WebContentsImpl* web_contents); | 45 static BrowserPluginEmbedder* Create(WebContentsImpl* web_contents); |
46 | 46 |
47 // Returns the RenderViewHost at a point (|x|, |y|) asynchronously via | 47 // Returns the RenderViewHost at a point (|x|, |y|) asynchronously via |
48 // |callback|. We need a roundtrip to renderer process to get this | 48 // |callback|. We need a roundtrip to renderer process to get this |
49 // information. | 49 // information. |
50 void GetRenderViewHostAtPosition( | 50 void GetRenderViewHostAtPosition( |
51 int x, | 51 int x, |
52 int y, | 52 int y, |
53 const WebContents::GetRenderViewHostCallback& callback); | 53 const WebContents::GetRenderViewHostCallback& callback); |
54 | 54 |
| 55 // Returns this embedder's WebContentsImpl. |
| 56 WebContentsImpl* GetWebContents(); |
| 57 |
55 // Called when embedder's |rwh| has sent screen rects to renderer. | 58 // Called when embedder's |rwh| has sent screen rects to renderer. |
56 void DidSendScreenRects(); | 59 void DidSendScreenRects(); |
57 | 60 |
58 // Called when embedder's WebContentsImpl has unhandled keyboard input. | 61 // Called when embedder's WebContentsImpl has unhandled keyboard input. |
59 // Returns whether the BrowserPlugin has handled the keyboard event. | 62 // Returns whether the BrowserPlugin has handled the keyboard event. |
60 // Currently we are only interested in checking for the escape key to | 63 // Currently we are only interested in checking for the escape key to |
61 // unlock hte guest's pointer lock. | 64 // unlock hte guest's pointer lock. |
62 bool HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 65 bool HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
63 | 66 |
64 // Overrides factory for testing. Default (NULL) value indicates regular | 67 // Overrides factory for testing. Default (NULL) value indicates regular |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // Pointer to the guest that started the drag, used to forward necessary drag | 143 // Pointer to the guest that started the drag, used to forward necessary drag |
141 // status messages to the correct guest. | 144 // status messages to the correct guest. |
142 base::WeakPtr<BrowserPluginGuest> guest_started_drag_; | 145 base::WeakPtr<BrowserPluginGuest> guest_started_drag_; |
143 | 146 |
144 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); | 147 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); |
145 }; | 148 }; |
146 | 149 |
147 } // namespace content | 150 } // namespace content |
148 | 151 |
149 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ | 152 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ |
OLD | NEW |