[Telemetry] Add SurfaceFlingerStats to timeline_based_measurement
[chromium-blink-merge.git] / ppapi / thunk / ppb_broker_api.h
blob8ac1dd2e547c28ab263c670c3351bef4ddf8f5ff
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
3 // found in the LICENSE file.
5 #ifndef PPAPI_THUNK_PPB_BROKER_API_H_
6 #define PPAPI_THUNK_PPB_BROKER_API_H_
8 #include "base/memory/ref_counted.h"
9 #include "ppapi/c/pp_bool.h"
10 #include "ppapi/c/pp_completion_callback.h"
11 #include "ppapi/c/pp_stdint.h"
12 #include "ppapi/shared_impl/singleton_resource_id.h"
14 namespace ppapi {
16 class TrackedCallback;
18 namespace thunk {
20 class PPB_Broker_API {
21 public:
22 virtual ~PPB_Broker_API() {}
24 virtual int32_t Connect(scoped_refptr<TrackedCallback> connect_callback) = 0;
25 virtual int32_t GetHandle(int32_t* handle) = 0;
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() {}
36 virtual PP_Bool IsAllowed() = 0;
38 static const SingletonResourceID kSingletonResourceID = BROKER_SINGLETON_ID;
41 } // namespace thunk
42 } // namespace ppapi
44 #endif // PPAPI_THUNK_PPB_BROKER_API_H_