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

Side by Side Diff: ppapi/thunk/ppb_broker_api.h

Issue 11316316: Implement an IsAllowed function in the pepper PPB_Broker_Trusted API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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
« no previous file with comments | « ppapi/thunk/interfaces_ppb_private.h ('k') | ppapi/thunk/ppb_broker_thunk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 PPAPI_THUNK_PPB_BROKER_API_H_ 5 #ifndef PPAPI_THUNK_PPB_BROKER_API_H_
6 #define PPAPI_THUNK_PPB_BROKER_API_H_ 6 #define PPAPI_THUNK_PPB_BROKER_API_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_completion_callback.h" 10 #include "ppapi/c/pp_completion_callback.h"
10 #include "ppapi/c/pp_stdint.h" 11 #include "ppapi/c/pp_stdint.h"
12 #include "ppapi/shared_impl/singleton_resource_id.h"
11 13
12 namespace ppapi { 14 namespace ppapi {
13 15
14 class TrackedCallback; 16 class TrackedCallback;
15 17
16 namespace thunk { 18 namespace thunk {
17 19
18 class PPB_Broker_API { 20 class PPB_Broker_API {
19 public: 21 public:
20 virtual ~PPB_Broker_API() {} 22 virtual ~PPB_Broker_API() {}
21 23
22 virtual int32_t Connect(scoped_refptr<TrackedCallback> connect_callback) = 0; 24 virtual int32_t Connect(scoped_refptr<TrackedCallback> connect_callback) = 0;
23 virtual int32_t GetHandle(int32_t* handle) = 0; 25 virtual int32_t GetHandle(int32_t* handle) = 0;
24 }; 26 };
25 27
28 // TODO(raymes): Merge this into PPB_Broker_API when the PPB_Broker proxy is
29 // refactored to the new resource model. The IsAllowed function should be
30 // attached to the resource implementing the PPB_Broker_API. However in order to
31 // implement this quickly, the function is added in a new instance API.
32 class PPB_Broker_Instance_API {
33 public:
34 virtual ~PPB_Broker_Instance_API() {}
35
36 virtual PP_Bool IsAllowed() = 0;
37
38 static const SingletonResourceID kSingletonResourceID = BROKER_SINGLETON_ID;
39 };
40
26 } // namespace thunk 41 } // namespace thunk
27 } // namespace ppapi 42 } // namespace ppapi
28 43
29 #endif // PPAPI_THUNK_PPB_BROKER_API_H_ 44 #endif // PPAPI_THUNK_PPB_BROKER_API_H_
OLDNEW
« no previous file with comments | « ppapi/thunk/interfaces_ppb_private.h ('k') | ppapi/thunk/ppb_broker_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698