Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Side by Side Diff: chrome/renderer/pepper/pepper_extensions_common_host.cc

Issue 13080002: Apps V2 in Pepper: introduce singleton resource ExtensionsCommon. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/renderer/pepper/pepper_extensions_common_host.h"
6
7 #include "base/values.h"
8 #include "content/public/renderer/renderer_ppapi_host.h"
9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/host/dispatch_host_message.h"
11 #include "ppapi/host/host_message_context.h"
12 #include "ppapi/host/ppapi_host.h"
13 #include "ppapi/proxy/ppapi_messages.h"
14
15 namespace chrome {
16
17 PepperExtensionsCommonHost::PepperExtensionsCommonHost(
18 content::RendererPpapiHost* host,
19 PP_Instance instance,
20 PP_Resource resource)
21 : ResourceHost(host->GetPpapiHost(), instance, resource),
22 renderer_ppapi_host_(host) {
23 }
24
25 PepperExtensionsCommonHost::~PepperExtensionsCommonHost() {
26 }
27
28 // static
29 PepperExtensionsCommonHost* PepperExtensionsCommonHost::Create(
30 content::RendererPpapiHost* host,
31 PP_Instance instance,
32 PP_Resource resource) {
33 return new PepperExtensionsCommonHost(host, instance, resource);
34 }
35
36 int32_t PepperExtensionsCommonHost::OnResourceMessageReceived(
37 const IPC::Message& msg,
38 ppapi::host::HostMessageContext* context) {
39 IPC_BEGIN_MESSAGE_MAP(PepperExtensionsCommonHost, msg)
40 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_ExtensionsCommon_Post,
41 OnPost)
42 PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_ExtensionsCommon_Call,
43 OnCall)
44 IPC_END_MESSAGE_MAP()
45 return PP_ERROR_FAILED;
46 }
47
48 int32_t PepperExtensionsCommonHost::OnPost(
49 ppapi::host::HostMessageContext* context,
50 const std::string& request_name,
51 const base::ListValue& args) {
52 // TODO(yzshen): Implement it.
53 return PP_ERROR_NOTSUPPORTED;
54 }
55
56 int32_t PepperExtensionsCommonHost::OnCall(
57 ppapi::host::HostMessageContext* context,
58 const std::string& request_name,
59 const base::ListValue& args) {
60 // TODO(yzshen): Implement it.
61 return PP_ERROR_NOTSUPPORTED;
62 }
63
64 } // namespace chrome
65
OLDNEW
« no previous file with comments | « chrome/renderer/pepper/pepper_extensions_common_host.h ('k') | ppapi/api/extensions/dev/ppb_alarms_dev.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698