Index: content/renderer/pepper/host_resource_var.cc |
diff --git a/content/renderer/pepper/host_resource_var.cc b/content/renderer/pepper/host_resource_var.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a59bed37f6f286f8a02ecbb8948712a8fe7f942e |
--- /dev/null |
+++ b/content/renderer/pepper/host_resource_var.cc |
@@ -0,0 +1,32 @@ |
+// 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) {} |
+ |
+HostResourceVar::HostResourceVar(const IPC::Message& creation_message) |
+ : pp_resource_(0), |
+ creation_message_(new IPC::Message(creation_message)) {} |
+ |
+PP_Resource HostResourceVar::GetPPResource() const { |
+ return pp_resource_; |
+} |
+ |
+const IPC::Message* HostResourceVar::GetCreationMessage() const { |
+ return creation_message_.get(); |
+} |
+ |
+bool HostResourceVar::IsPending() const { |
+ return pp_resource_ == 0 && creation_message_; |
+} |
+ |
+HostResourceVar::~HostResourceVar() {} |
+ |
+} // namespace content |