OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 PPAPI_NACL_IRT_PPAPI_DISPATCHER_H_ | 5 #ifndef PPAPI_NACL_IRT_PPAPI_DISPATCHER_H_ |
6 #define PPAPI_NACL_IRT_PPAPI_DISPATCHER_H_ | 6 #define PPAPI_NACL_IRT_PPAPI_DISPATCHER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 public proxy::PluginProxyDelegate, | 45 public proxy::PluginProxyDelegate, |
46 public IPC::Listener, | 46 public IPC::Listener, |
47 public IPC::Sender { | 47 public IPC::Sender { |
48 public: | 48 public: |
49 PpapiDispatcher(scoped_refptr<base::MessageLoopProxy> io_loop, | 49 PpapiDispatcher(scoped_refptr<base::MessageLoopProxy> io_loop, |
50 base::WaitableEvent* shutdown_event, | 50 base::WaitableEvent* shutdown_event, |
51 int browser_ipc_fd, | 51 int browser_ipc_fd, |
52 int renderer_ipc_fd); | 52 int renderer_ipc_fd); |
53 | 53 |
54 // PluginDispatcher::PluginDelegate implementation. | 54 // PluginDispatcher::PluginDelegate implementation. |
55 virtual base::MessageLoopProxy* GetIPCMessageLoop() OVERRIDE; | 55 virtual base::MessageLoopProxy* GetIPCMessageLoop() override; |
56 virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE; | 56 virtual base::WaitableEvent* GetShutdownEvent() override; |
57 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( | 57 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( |
58 base::PlatformFile handle, | 58 base::PlatformFile handle, |
59 base::ProcessId peer_pid, | 59 base::ProcessId peer_pid, |
60 bool should_close_source) OVERRIDE; | 60 bool should_close_source) override; |
61 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE; | 61 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() override; |
62 virtual uint32 Register( | 62 virtual uint32 Register( |
63 proxy::PluginDispatcher* plugin_dispatcher) OVERRIDE; | 63 proxy::PluginDispatcher* plugin_dispatcher) override; |
64 virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE; | 64 virtual void Unregister(uint32 plugin_dispatcher_id) override; |
65 | 65 |
66 // PluginProxyDelegate implementation. | 66 // PluginProxyDelegate implementation. |
67 virtual IPC::Sender* GetBrowserSender() OVERRIDE; | 67 virtual IPC::Sender* GetBrowserSender() override; |
68 virtual std::string GetUILanguage() OVERRIDE; | 68 virtual std::string GetUILanguage() override; |
69 virtual void PreCacheFont(const void* logfontw) OVERRIDE; | 69 virtual void PreCacheFont(const void* logfontw) override; |
70 virtual void SetActiveURL(const std::string& url) OVERRIDE; | 70 virtual void SetActiveURL(const std::string& url) override; |
71 virtual PP_Resource CreateBrowserFont( | 71 virtual PP_Resource CreateBrowserFont( |
72 proxy::Connection connection, | 72 proxy::Connection connection, |
73 PP_Instance instance, | 73 PP_Instance instance, |
74 const PP_BrowserFont_Trusted_Description& desc, | 74 const PP_BrowserFont_Trusted_Description& desc, |
75 const Preferences& prefs) OVERRIDE; | 75 const Preferences& prefs) override; |
76 | 76 |
77 // IPC::Listener implementation. | 77 // IPC::Listener implementation. |
78 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 78 virtual bool OnMessageReceived(const IPC::Message& message) override; |
79 virtual void OnChannelError() OVERRIDE; | 79 virtual void OnChannelError() override; |
80 | 80 |
81 // IPC::Sender implementation | 81 // IPC::Sender implementation |
82 virtual bool Send(IPC::Message* message) OVERRIDE; | 82 virtual bool Send(IPC::Message* message) override; |
83 | 83 |
84 private: | 84 private: |
85 void OnMsgInitializeNaClDispatcher(const PpapiNaClPluginArgs& args); | 85 void OnMsgInitializeNaClDispatcher(const PpapiNaClPluginArgs& args); |
86 void OnPluginDispatcherMessageReceived(const IPC::Message& msg); | 86 void OnPluginDispatcherMessageReceived(const IPC::Message& msg); |
87 | 87 |
88 std::set<PP_Instance> instances_; | 88 std::set<PP_Instance> instances_; |
89 std::map<uint32, proxy::PluginDispatcher*> plugin_dispatchers_; | 89 std::map<uint32, proxy::PluginDispatcher*> plugin_dispatchers_; |
90 uint32 next_plugin_dispatcher_id_; | 90 uint32 next_plugin_dispatcher_id_; |
91 | 91 |
92 scoped_refptr<base::MessageLoopProxy> message_loop_; | 92 scoped_refptr<base::MessageLoopProxy> message_loop_; |
93 base::WaitableEvent* shutdown_event_; | 93 base::WaitableEvent* shutdown_event_; |
94 int renderer_ipc_fd_; | 94 int renderer_ipc_fd_; |
95 scoped_ptr<IPC::SyncChannel> channel_; | 95 scoped_ptr<IPC::SyncChannel> channel_; |
96 }; | 96 }; |
97 | 97 |
98 } // namespace ppapi | 98 } // namespace ppapi |
99 | 99 |
100 #endif // PPAPI_NACL_IRT_PPAPI_DISPATCHER_H_ | 100 #endif // PPAPI_NACL_IRT_PPAPI_DISPATCHER_H_ |
OLD | NEW |