• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #include "ppapi/shared_impl/host_resource.h"
6 
7 namespace ppapi {
8 
HostResource()9 HostResource::HostResource() : instance_(0), host_resource_(0) {}
10 
11 // static
MakeInstanceOnly(PP_Instance instance)12 HostResource HostResource::MakeInstanceOnly(PP_Instance instance) {
13   HostResource resource;
14   resource.SetHostResource(instance, 0);
15   return resource;
16 }
17 
SetHostResource(PP_Instance instance,PP_Resource resource)18 void HostResource::SetHostResource(PP_Instance instance, PP_Resource resource) {
19   instance_ = instance;
20   host_resource_ = resource;
21 }
22 
23 }  // namespace ppapi
24