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_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "content/renderer/pepper/pepper_parent_context_provider.h" | 22 #include "content/renderer/pepper/pepper_parent_context_provider.h" |
23 #include "ppapi/shared_impl/private/ppb_host_resolver_shared.h" | 23 #include "ppapi/shared_impl/private/ppb_host_resolver_shared.h" |
24 #include "ppapi/shared_impl/private/ppb_tcp_server_socket_shared.h" | 24 #include "ppapi/shared_impl/private/ppb_tcp_server_socket_shared.h" |
25 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" | 25 #include "ppapi/shared_impl/private/tcp_socket_private_impl.h" |
26 #include "ppapi/shared_impl/private/udp_socket_private_impl.h" | 26 #include "ppapi/shared_impl/private/udp_socket_private_impl.h" |
27 #include "ui/base/ime/text_input_type.h" | 27 #include "ui/base/ime/text_input_type.h" |
28 #include "webkit/plugins/ppapi/plugin_delegate.h" | 28 #include "webkit/plugins/ppapi/plugin_delegate.h" |
29 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" | 29 #include "webkit/plugins/ppapi/ppb_flash_menu_impl.h" |
30 | 30 |
31 class FilePath; | 31 class FilePath; |
32 class PepperBrokerImpl; | |
33 class PepperDeviceEnumerationEventHandler; | |
34 class PepperPluginDelegateImpl; | |
35 class RenderViewImpl; | 32 class RenderViewImpl; |
36 | 33 class TransportDIB; |
37 namespace content { | |
38 class GamepadSharedMemoryReader; | |
39 struct CustomContextMenuContext; | |
40 } | |
41 | 34 |
42 namespace gfx { | 35 namespace gfx { |
43 class Point; | 36 class Point; |
44 class Rect; | 37 class Rect; |
45 } | 38 } |
46 | 39 |
47 namespace IPC { | 40 namespace IPC { |
48 struct ChannelHandle; | 41 struct ChannelHandle; |
49 } | 42 } |
50 | 43 |
(...skipping 11 matching lines...) Expand all Loading... |
62 } | 55 } |
63 | 56 |
64 namespace WebKit { | 57 namespace WebKit { |
65 class WebFileChooserCompletion; | 58 class WebFileChooserCompletion; |
66 class WebGamepads; | 59 class WebGamepads; |
67 class WebMouseEvent; | 60 class WebMouseEvent; |
68 struct WebCompositionUnderline; | 61 struct WebCompositionUnderline; |
69 struct WebFileChooserParams; | 62 struct WebFileChooserParams; |
70 } | 63 } |
71 | 64 |
72 class TransportDIB; | 65 namespace content { |
| 66 |
| 67 struct CustomContextMenuContext; |
| 68 class GamepadSharedMemoryReader; |
| 69 class PepperBrokerImpl; |
| 70 class PepperDeviceEnumerationEventHandler; |
| 71 class PepperPluginDelegateImpl; |
73 | 72 |
74 class PepperPluginDelegateImpl | 73 class PepperPluginDelegateImpl |
75 : public webkit::ppapi::PluginDelegate, | 74 : public webkit::ppapi::PluginDelegate, |
76 public base::SupportsWeakPtr<PepperPluginDelegateImpl>, | 75 public base::SupportsWeakPtr<PepperPluginDelegateImpl>, |
77 public PepperParentContextProvider, | 76 public PepperParentContextProvider, |
78 public content::RenderViewObserver { | 77 public RenderViewObserver { |
79 public: | 78 public: |
80 explicit PepperPluginDelegateImpl(RenderViewImpl* render_view); | 79 explicit PepperPluginDelegateImpl(RenderViewImpl* render_view); |
81 virtual ~PepperPluginDelegateImpl(); | 80 virtual ~PepperPluginDelegateImpl(); |
82 | 81 |
83 // Attempts to create a PPAPI plugin for the given filepath. On success, it | 82 // Attempts to create a PPAPI plugin for the given filepath. On success, it |
84 // will return the newly-created module. | 83 // will return the newly-created module. |
85 // | 84 // |
86 // There are two reasons for failure. The first is that the plugin isn't | 85 // There are two reasons for failure. The first is that the plugin isn't |
87 // a PPAPI plugin. In this case, |*pepper_plugin_was_registered| will be set | 86 // a PPAPI plugin. In this case, |*pepper_plugin_was_registered| will be set |
88 // to false and the caller may want to fall back on creating an NPAPI plugin. | 87 // to false and the caller may want to fall back on creating an NPAPI plugin. |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 virtual bool AddNetworkListObserver( | 309 virtual bool AddNetworkListObserver( |
311 webkit_glue::NetworkListObserver* observer) OVERRIDE; | 310 webkit_glue::NetworkListObserver* observer) OVERRIDE; |
312 virtual void RemoveNetworkListObserver( | 311 virtual void RemoveNetworkListObserver( |
313 webkit_glue::NetworkListObserver* observer) OVERRIDE; | 312 webkit_glue::NetworkListObserver* observer) OVERRIDE; |
314 | 313 |
315 virtual int32_t ShowContextMenu( | 314 virtual int32_t ShowContextMenu( |
316 webkit::ppapi::PluginInstance* instance, | 315 webkit::ppapi::PluginInstance* instance, |
317 webkit::ppapi::PPB_Flash_Menu_Impl* menu, | 316 webkit::ppapi::PPB_Flash_Menu_Impl* menu, |
318 const gfx::Point& position) OVERRIDE; | 317 const gfx::Point& position) OVERRIDE; |
319 void OnContextMenuClosed( | 318 void OnContextMenuClosed( |
320 const content::CustomContextMenuContext& custom_context); | 319 const CustomContextMenuContext& custom_context); |
321 void OnCustomContextMenuAction( | 320 void OnCustomContextMenuAction( |
322 const content::CustomContextMenuContext& custom_context, | 321 const CustomContextMenuContext& custom_context, |
323 unsigned action); | 322 unsigned action); |
324 void CompleteShowContextMenu(int request_id, | 323 void CompleteShowContextMenu(int request_id, |
325 bool did_select, | 324 bool did_select, |
326 unsigned action); | 325 unsigned action); |
327 virtual webkit::ppapi::FullscreenContainer* | 326 virtual webkit::ppapi::FullscreenContainer* |
328 CreateFullscreenContainer( | 327 CreateFullscreenContainer( |
329 webkit::ppapi::PluginInstance* instance) OVERRIDE; | 328 webkit::ppapi::PluginInstance* instance) OVERRIDE; |
330 virtual gfx::Size GetScreenSize() OVERRIDE; | 329 virtual gfx::Size GetScreenSize() OVERRIDE; |
331 virtual std::string GetDefaultEncoding() OVERRIDE; | 330 virtual std::string GetDefaultEncoding() OVERRIDE; |
332 virtual void ZoomLimitsChanged(double minimum_factor, double maximum_factor) | 331 virtual void ZoomLimitsChanged(double minimum_factor, double maximum_factor) |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 // Current text input composition text. Empty if no composition is in | 469 // Current text input composition text. Empty if no composition is in |
471 // progress. | 470 // progress. |
472 string16 composition_text_; | 471 string16 composition_text_; |
473 | 472 |
474 // The plugin instance that received the last mouse event. It is set to NULL | 473 // The plugin instance that received the last mouse event. It is set to NULL |
475 // if the last mouse event went to elements other than Pepper plugins. | 474 // if the last mouse event went to elements other than Pepper plugins. |
476 // |last_mouse_event_target_| is not owned by this class. We can know about | 475 // |last_mouse_event_target_| is not owned by this class. We can know about |
477 // when it is destroyed via InstanceDeleted(). | 476 // when it is destroyed via InstanceDeleted(). |
478 webkit::ppapi::PluginInstance* last_mouse_event_target_; | 477 webkit::ppapi::PluginInstance* last_mouse_event_target_; |
479 | 478 |
480 scoped_ptr<content::GamepadSharedMemoryReader> gamepad_shared_memory_reader_; | 479 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; |
481 | 480 |
482 scoped_ptr<PepperDeviceEnumerationEventHandler> | 481 scoped_ptr<PepperDeviceEnumerationEventHandler> |
483 device_enumeration_event_handler_; | 482 device_enumeration_event_handler_; |
484 | 483 |
485 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); | 484 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); |
486 }; | 485 }; |
487 | 486 |
| 487 } // namespace content |
| 488 |
488 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ | 489 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ |
OLD | NEW |