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

Unified Diff: ppapi/thunk/ppb_transport_api.h

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try again Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/thunk/ppb_transport_api.h
diff --git a/ppapi/thunk/ppb_transport_api.h b/ppapi/thunk/ppb_transport_api.h
index 256d92053c3006e7c17dc8305c92eb3a6613d037..3063147ff9310743f87bb14f6f380e5479469b2b 100644
--- a/ppapi/thunk/ppb_transport_api.h
+++ b/ppapi/thunk/ppb_transport_api.h
@@ -1,13 +1,17 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef PPAPI_THUNK_PPB_TRANSPORT_API_H_
#define PPAPI_THUNK_PPB_TRANSPORT_API_H_
+#include "base/memory/ref_counted.h"
#include "ppapi/c/dev/ppb_transport_dev.h"
namespace ppapi {
+
+class TrackedCallback;
+
namespace thunk {
class PPB_Transport_API {
@@ -16,14 +20,14 @@ class PPB_Transport_API {
virtual PP_Bool IsWritable() = 0;
virtual int32_t SetProperty(PP_TransportProperty property, PP_Var value) = 0;
- virtual int32_t Connect(PP_CompletionCallback callback) = 0;
+ virtual int32_t Connect(scoped_refptr<TrackedCallback> callback) = 0;
virtual int32_t GetNextAddress(PP_Var* address,
- PP_CompletionCallback callback) = 0;
+ scoped_refptr<TrackedCallback> callback) = 0;
virtual int32_t ReceiveRemoteAddress(PP_Var address) = 0;
virtual int32_t Recv(void* data, uint32_t len,
- PP_CompletionCallback callback) = 0;
+ scoped_refptr<TrackedCallback> callback) = 0;
virtual int32_t Send(const void* data, uint32_t len,
- PP_CompletionCallback callback) = 0;
+ scoped_refptr<TrackedCallback> callback) = 0;
virtual int32_t Close() = 0;
};

Powered by Google App Engine
This is Rietveld 408576698