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 |
11 // in receiving should be listened for here. | 11 // in receiving should be listened for here. |
12 // | 12 // |
13 // BrowserPluginGuest is a WebContentsObserver for the guest WebContents. | 13 // BrowserPluginGuest is a WebContentsObserver for the guest WebContents. |
14 // BrowserPluginGuest operates under the assumption that the guest will be | 14 // BrowserPluginGuest operates under the assumption that the guest will be |
15 // accessible through only one RenderViewHost for the lifetime of | 15 // accessible through only one RenderViewHost for the lifetime of |
16 // the guest WebContents. Thus, cross-process navigation is not supported. | 16 // the guest WebContents. Thus, cross-process navigation is not supported. |
17 | 17 |
18 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 18 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
19 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 19 #define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
20 | 20 |
| 21 #include <stdint.h> |
| 22 |
21 #include <map> | 23 #include <map> |
22 #include <queue> | 24 #include <queue> |
23 | 25 |
24 #include "base/compiler_specific.h" | 26 #include "base/compiler_specific.h" |
| 27 #include "base/macros.h" |
25 #include "base/memory/linked_ptr.h" | 28 #include "base/memory/linked_ptr.h" |
26 #include "base/memory/weak_ptr.h" | 29 #include "base/memory/weak_ptr.h" |
27 #include "base/values.h" | 30 #include "base/values.h" |
| 31 #include "build/build_config.h" |
28 #include "content/common/edit_command.h" | 32 #include "content/common/edit_command.h" |
29 #include "content/common/input/input_event_ack_state.h" | 33 #include "content/common/input/input_event_ack_state.h" |
30 #include "content/public/browser/browser_plugin_guest_delegate.h" | 34 #include "content/public/browser/browser_plugin_guest_delegate.h" |
31 #include "content/public/browser/guest_host.h" | 35 #include "content/public/browser/guest_host.h" |
32 #include "content/public/browser/readback_types.h" | 36 #include "content/public/browser/readback_types.h" |
33 #include "content/public/browser/web_contents_observer.h" | 37 #include "content/public/browser/web_contents_observer.h" |
34 #include "third_party/WebKit/public/platform/WebFocusType.h" | 38 #include "third_party/WebKit/public/platform/WebFocusType.h" |
35 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" | 39 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
36 #include "third_party/WebKit/public/web/WebDragOperation.h" | 40 #include "third_party/WebKit/public/web/WebDragOperation.h" |
37 #include "third_party/WebKit/public/web/WebDragStatus.h" | 41 #include "third_party/WebKit/public/web/WebDragStatus.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 void EmbedderSystemDragEnded(); | 235 void EmbedderSystemDragEnded(); |
232 void EndSystemDragIfApplicable(); | 236 void EndSystemDragIfApplicable(); |
233 | 237 |
234 void RespondToPermissionRequest(int request_id, | 238 void RespondToPermissionRequest(int request_id, |
235 bool should_allow, | 239 bool should_allow, |
236 const std::string& user_input); | 240 const std::string& user_input); |
237 | 241 |
238 void PointerLockPermissionResponse(bool allow); | 242 void PointerLockPermissionResponse(bool allow); |
239 | 243 |
240 // The next two functions are virtual for test purposes. | 244 // The next two functions are virtual for test purposes. |
241 virtual void SwapCompositorFrame(uint32 output_surface_id, | 245 virtual void SwapCompositorFrame(uint32_t output_surface_id, |
242 int host_process_id, | 246 int host_process_id, |
243 int host_routing_id, | 247 int host_routing_id, |
244 scoped_ptr<cc::CompositorFrame> frame); | 248 scoped_ptr<cc::CompositorFrame> frame); |
245 virtual void SetChildFrameSurface(const cc::SurfaceId& surface_id, | 249 virtual void SetChildFrameSurface(const cc::SurfaceId& surface_id, |
246 const gfx::Size& frame_size, | 250 const gfx::Size& frame_size, |
247 float scale_factor, | 251 float scale_factor, |
248 const cc::SurfaceSequence& sequence); | 252 const cc::SurfaceSequence& sequence); |
249 | 253 |
250 // Find the given |search_text| in the page. Returns true if the find request | 254 // Find the given |search_text| in the page. Returns true if the find request |
251 // is handled by this browser plugin guest. | 255 // is handled by this browser plugin guest. |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 // Weak pointer used to ask GeolocationPermissionContext about geolocation | 474 // Weak pointer used to ask GeolocationPermissionContext about geolocation |
471 // permission. | 475 // permission. |
472 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; | 476 base::WeakPtrFactory<BrowserPluginGuest> weak_ptr_factory_; |
473 | 477 |
474 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); | 478 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); |
475 }; | 479 }; |
476 | 480 |
477 } // namespace content | 481 } // namespace content |
478 | 482 |
479 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ | 483 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ |
OLD | NEW |