Bluetooth: clean up Bluetooth classes
[chromium-blink-merge.git] / ppapi / thunk / ppb_message_loop_api.h
blobefc18627feba7a065115f0a6f81afbe12adb581d
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_MESSAGE_LOOP_API_H_
6 #define PPAPI_THUNK_PPB_MESSAGE_LOOP_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/thunk/ppapi_thunk_export.h"
14 namespace ppapi {
16 class TrackedCallback;
18 namespace thunk {
20 class PPAPI_THUNK_EXPORT PPB_MessageLoop_API {
21 public:
22 virtual ~PPB_MessageLoop_API() {}
24 virtual int32_t AttachToCurrentThread() = 0;
25 virtual int32_t Run() = 0;
26 // Note: Most interfaces should use scoped_refptr<TrackedCallback>, in order
27 // to track callbacks and support things like blocking or optional callbacks.
28 // In this case, the callback is really just a way to pass a function pointer,
29 // and those options don't make sense.
30 virtual int32_t PostWork(PP_CompletionCallback callback,
31 int64_t delay_ms) = 0;
32 virtual int32_t PostQuit(PP_Bool should_destroy) = 0;
35 } // namespace thunk
36 } // namespace ppapi
38 #endif // PPAPI_THUNK_PPB_MESSAGE_LOOP_API_H_