root/content/renderer/pepper/host_resource_var.cc

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

DEFINITIONS

This source file includes following definitions.
  1. pending_browser_host_id_
  2. creation_message_
  3. GetPPResource
  4. GetPendingRendererHostId
  5. GetPendingBrowserHostId
  6. GetCreationMessage
  7. IsPending

// Copyright 2013 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 "content/renderer/pepper/host_resource_var.h"

namespace content {

HostResourceVar::HostResourceVar() : pp_resource_(0) {}

HostResourceVar::HostResourceVar(PP_Resource pp_resource)
    : pp_resource_(pp_resource),
      pending_renderer_host_id_(0),
      pending_browser_host_id_(0) {}

HostResourceVar::HostResourceVar(int pending_renderer_host_id,
                                 const IPC::Message& creation_message)
    : pp_resource_(0),
      pending_renderer_host_id_(pending_renderer_host_id),
      pending_browser_host_id_(0),
      creation_message_(new IPC::Message(creation_message)) {}

PP_Resource HostResourceVar::GetPPResource() const {
  return pp_resource_;
}

int HostResourceVar::GetPendingRendererHostId() const {
  return pending_renderer_host_id_;
}

int HostResourceVar::GetPendingBrowserHostId() const {
  return pending_browser_host_id_;
}

const IPC::Message* HostResourceVar::GetCreationMessage() const {
  return creation_message_.get();
}

bool HostResourceVar::IsPending() const {
  return pp_resource_ == 0 && creation_message_;
}

HostResourceVar::~HostResourceVar() {}

}  // namespace content

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