| OLD | NEW |
| (Empty) | |
| 1 /* |
| 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. |
| 5 */ |
| 6 |
| 7 #include "native_client/src/untrusted/nacl_ppapi_util/nacl_ppapi_util.h" |
| 8 |
| 9 // TODO(bsy): move weak_ref module to the shared directory |
| 10 #include "native_client/src/trusted/weak_ref/weak_ref.h" |
| 11 #include "native_client/src/trusted/weak_ref/call_on_main_thread.h" |
| 12 |
| 13 |
| 14 namespace nacl_ppapi { |
| 15 |
| 16 static VoidResult kVoidResult; |
| 17 VoidResult *const g_void_result = &kVoidResult; |
| 18 |
| 19 NaClPpapiPluginInstance::NaClPpapiPluginInstance(PP_Instance instance) |
| 20 : pp::Instance(instance) { |
| 21 anchor_ = new nacl::WeakRefAnchor(); |
| 22 } |
| 23 |
| 24 NaClPpapiPluginInstance::~NaClPpapiPluginInstance() { |
| 25 anchor_->Abandon(); |
| 26 anchor_->Unref(); |
| 27 } |
| 28 |
| 29 } // namespace nacl_ppapi |
| OLD | NEW |