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

Side by Side Diff: webkit/plugins/ppapi/ppb_broker_impl.cc

Issue 7082036: Convert more interfaces to the new thunk system. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "webkit/plugins/ppapi/ppb_broker_impl.h" 5 #include "webkit/plugins/ppapi/ppb_broker_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "webkit/plugins/ppapi/common.h" 8 #include "webkit/plugins/ppapi/common.h"
9 #include "webkit/plugins/ppapi/plugin_module.h" 9 #include "webkit/plugins/ppapi/plugin_module.h"
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 if (!instance) 54 if (!instance)
55 return 0; 55 return 0;
56 scoped_refptr<PPB_Broker_Impl> broker(new PPB_Broker_Impl(instance)); 56 scoped_refptr<PPB_Broker_Impl> broker(new PPB_Broker_Impl(instance));
57 return broker->GetReference(); 57 return broker->GetReference();
58 } 58 }
59 59
60 PPB_Broker_Impl* PPB_Broker_Impl::AsPPB_Broker_Impl() { 60 PPB_Broker_Impl* PPB_Broker_Impl::AsPPB_Broker_Impl() {
61 return this; 61 return this;
62 } 62 }
63 63
64 PPB_Broker_API* PPB_Broker_Impl::AsBroker_API() { 64 PPB_Broker_API* PPB_Broker_Impl::AsPPB_Broker_API() {
65 return this; 65 return this;
66 } 66 }
67 67
68 int32_t PPB_Broker_Impl::Connect(PP_CompletionCallback connect_callback) { 68 int32_t PPB_Broker_Impl::Connect(PP_CompletionCallback connect_callback) {
69 if (!connect_callback.func) { 69 if (!connect_callback.func) {
70 // Synchronous calls are not supported. 70 // Synchronous calls are not supported.
71 return PP_ERROR_BADARGUMENT; 71 return PP_ERROR_BADARGUMENT;
72 } 72 }
73 73
74 // TODO(ddorwin): Return PP_ERROR_FAILED if plugin is in-process. 74 // TODO(ddorwin): Return PP_ERROR_FAILED if plugin is in-process.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Synchronous calls are not supported. 118 // Synchronous calls are not supported.
119 DCHECK(connect_callback_.get() && !connect_callback_->completed()); 119 DCHECK(connect_callback_.get() && !connect_callback_->completed());
120 120
121 scoped_refptr<TrackedCompletionCallback> callback; 121 scoped_refptr<TrackedCompletionCallback> callback;
122 callback.swap(connect_callback_); 122 callback.swap(connect_callback_);
123 callback->Run(result); // Will complete abortively if necessary. 123 callback->Run(result); // Will complete abortively if necessary.
124 } 124 }
125 125
126 } // namespace ppapi 126 } // namespace ppapi
127 } // namespace webkit 127 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698