root/ppapi/shared_impl/host_resource.cc

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. host_resource_
  2. MakeInstanceOnly
  3. SetHostResource

// 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.

#include "ppapi/shared_impl/host_resource.h"

namespace ppapi {

HostResource::HostResource() : instance_(0), host_resource_(0) {}

// static
HostResource HostResource::MakeInstanceOnly(PP_Instance instance) {
  HostResource resource;
  resource.SetHostResource(instance, 0);
  return resource;
}

void HostResource::SetHostResource(PP_Instance instance, PP_Resource resource) {
  instance_ = instance;
  host_resource_ = resource;
}

}  // namespace ppapi

/* [<][>][^][v][top][bottom][index][help] */