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

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

Issue 9391013: Make a global enum to differentiate impl & proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 "ppapi/shared_impl/platform_file.h" 8 #include "ppapi/shared_impl/platform_file.h"
9 #include "webkit/plugins/ppapi/common.h" 9 #include "webkit/plugins/ppapi/common.h"
10 #include "webkit/plugins/ppapi/plugin_module.h" 10 #include "webkit/plugins/ppapi/plugin_module.h"
11 #include "webkit/plugins/ppapi/resource_helper.h" 11 #include "webkit/plugins/ppapi/resource_helper.h"
12 12
13 using ppapi::PlatformFileToInt; 13 using ppapi::PlatformFileToInt;
14 using ppapi::thunk::PPB_Broker_API; 14 using ppapi::thunk::PPB_Broker_API;
15 using ppapi::TrackedCallback; 15 using ppapi::TrackedCallback;
16 16
17 namespace webkit { 17 namespace webkit {
18 namespace ppapi { 18 namespace ppapi {
19 19
20 // PPB_Broker_Impl ------------------------------------------------------ 20 // PPB_Broker_Impl ------------------------------------------------------
21 21
22 PPB_Broker_Impl::PPB_Broker_Impl(PP_Instance instance) 22 PPB_Broker_Impl::PPB_Broker_Impl(PP_Instance instance)
23 : Resource(instance), 23 : Resource(::ppapi::OBJECT_IS_IMPL, instance),
24 broker_(NULL), 24 broker_(NULL),
25 connect_callback_(), 25 connect_callback_(),
26 pipe_handle_(PlatformFileToInt(base::kInvalidPlatformFileValue)) { 26 pipe_handle_(PlatformFileToInt(base::kInvalidPlatformFileValue)) {
27 } 27 }
28 28
29 PPB_Broker_Impl::~PPB_Broker_Impl() { 29 PPB_Broker_Impl::~PPB_Broker_Impl() {
30 if (broker_) { 30 if (broker_) {
31 broker_->Disconnect(this); 31 broker_->Disconnect(this);
32 broker_ = NULL; 32 broker_ = NULL;
33 } 33 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 pipe_handle_ = handle; 89 pipe_handle_ = handle;
90 90
91 // Synchronous calls are not supported. 91 // Synchronous calls are not supported.
92 DCHECK(TrackedCallback::IsPending(connect_callback_)); 92 DCHECK(TrackedCallback::IsPending(connect_callback_));
93 93
94 TrackedCallback::ClearAndRun(&connect_callback_, result); 94 TrackedCallback::ClearAndRun(&connect_callback_, result);
95 } 95 }
96 96
97 } // namespace ppapi 97 } // namespace ppapi
98 } // namespace webkit 98 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698