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 #include <map> | 5 #include <map> |
6 #include <set> | 6 #include <set> |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 // Need to include this before most other files because it defines | 9 // Need to include this before most other files because it defines |
10 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define | 10 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 bool should_close_source) OVERRIDE; | 71 bool should_close_source) OVERRIDE; |
72 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE; | 72 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE; |
73 virtual uint32 Register(PluginDispatcher* plugin_dispatcher) OVERRIDE; | 73 virtual uint32 Register(PluginDispatcher* plugin_dispatcher) OVERRIDE; |
74 virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE; | 74 virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE; |
75 | 75 |
76 // PluginProxyDelegate implementation. | 76 // PluginProxyDelegate implementation. |
77 virtual IPC::Sender* GetBrowserSender() OVERRIDE; | 77 virtual IPC::Sender* GetBrowserSender() OVERRIDE; |
78 virtual std::string GetUILanguage() OVERRIDE; | 78 virtual std::string GetUILanguage() OVERRIDE; |
79 virtual void PreCacheFont(const void* logfontw) OVERRIDE; | 79 virtual void PreCacheFont(const void* logfontw) OVERRIDE; |
80 virtual void SetActiveURL(const std::string& url) OVERRIDE; | 80 virtual void SetActiveURL(const std::string& url) OVERRIDE; |
| 81 virtual PP_Resource CreateBrowserFont( |
| 82 ppapi::proxy::Connection connection, |
| 83 PP_Instance instance, |
| 84 const PP_BrowserFont_Trusted_Description& desc, |
| 85 const ppapi::Preferences& prefs) OVERRIDE; |
81 | 86 |
82 // IPC::Listener implementation. | 87 // IPC::Listener implementation. |
83 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 88 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
84 | 89 |
85 private: | 90 private: |
86 void OnMsgCreateNaClChannel(int renderer_id, | 91 void OnMsgCreateNaClChannel(int renderer_id, |
87 const ppapi::PpapiNaClChannelArgs& args, | 92 const ppapi::PpapiNaClChannelArgs& args, |
88 SerializedHandle handle); | 93 SerializedHandle handle); |
89 void OnMsgResourceReply( | 94 void OnMsgResourceReply( |
90 const ppapi::proxy::ResourceMessageReplyParams& reply_params, | 95 const ppapi::proxy::ResourceMessageReplyParams& reply_params, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 } | 167 } |
163 | 168 |
164 void PpapiDispatcher::PreCacheFont(const void* logfontw) { | 169 void PpapiDispatcher::PreCacheFont(const void* logfontw) { |
165 NOTIMPLEMENTED(); | 170 NOTIMPLEMENTED(); |
166 } | 171 } |
167 | 172 |
168 void PpapiDispatcher::SetActiveURL(const std::string& url) { | 173 void PpapiDispatcher::SetActiveURL(const std::string& url) { |
169 NOTIMPLEMENTED(); | 174 NOTIMPLEMENTED(); |
170 } | 175 } |
171 | 176 |
| 177 PP_Resource PpapiDispatcher::CreateBrowserFont( |
| 178 ppapi::proxy::Connection connection, |
| 179 PP_Instance instance, |
| 180 const PP_BrowserFont_Trusted_Description& desc, |
| 181 const ppapi::Preferences& prefs) { |
| 182 NOTIMPLEMENTED(); |
| 183 return 0; |
| 184 } |
| 185 |
172 bool PpapiDispatcher::OnMessageReceived(const IPC::Message& msg) { | 186 bool PpapiDispatcher::OnMessageReceived(const IPC::Message& msg) { |
173 IPC_BEGIN_MESSAGE_MAP(PpapiDispatcher, msg) | 187 IPC_BEGIN_MESSAGE_MAP(PpapiDispatcher, msg) |
174 IPC_MESSAGE_HANDLER(PpapiMsg_CreateNaClChannel, OnMsgCreateNaClChannel) | 188 IPC_MESSAGE_HANDLER(PpapiMsg_CreateNaClChannel, OnMsgCreateNaClChannel) |
175 IPC_MESSAGE_HANDLER(PpapiPluginMsg_ResourceReply, OnMsgResourceReply) | 189 IPC_MESSAGE_HANDLER(PpapiPluginMsg_ResourceReply, OnMsgResourceReply) |
176 // All other messages are simply forwarded to a PluginDispatcher. | 190 // All other messages are simply forwarded to a PluginDispatcher. |
177 IPC_MESSAGE_UNHANDLED(OnPluginDispatcherMessageReceived(msg)) | 191 IPC_MESSAGE_UNHANDLED(OnPluginDispatcherMessageReceived(msg)) |
178 IPC_END_MESSAGE_MAP() | 192 IPC_END_MESSAGE_MAP() |
179 return true; | 193 return true; |
180 } | 194 } |
181 | 195 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 if (error) | 287 if (error) |
274 return error; | 288 return error; |
275 | 289 |
276 PpapiDispatcher ppapi_dispatcher(io_thread.message_loop_proxy()); | 290 PpapiDispatcher ppapi_dispatcher(io_thread.message_loop_proxy()); |
277 plugin_globals.set_plugin_proxy_delegate(&ppapi_dispatcher); | 291 plugin_globals.set_plugin_proxy_delegate(&ppapi_dispatcher); |
278 | 292 |
279 loop.Run(); | 293 loop.Run(); |
280 | 294 |
281 return 0; | 295 return 0; |
282 } | 296 } |
OLD | NEW |