Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: ppapi/shared_impl/ppb_device_ref_shared.h

Issue 9192019: Implement PPB_DeviceRef_Dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/shared_impl/ppb_device_ref_shared.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/ppb_device_ref_shared.h
diff --git a/ppapi/shared_impl/ppb_device_ref_shared.h b/ppapi/shared_impl/ppb_device_ref_shared.h
new file mode 100644
index 0000000000000000000000000000000000000000..bbdda72f368ed3097bf16d4e70627b53745cfa2b
--- /dev/null
+++ b/ppapi/shared_impl/ppb_device_ref_shared.h
@@ -0,0 +1,60 @@
+// 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.
+
+#ifndef PPAPI_SHARED_IMPL_PPB_DEVICE_REF_SHARED_H_
+#define PPAPI_SHARED_IMPL_PPB_DEVICE_REF_SHARED_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "ppapi/shared_impl/resource.h"
+#include "ppapi/thunk/ppb_device_ref_api.h"
+
+namespace ppapi {
+
+// IF YOU ADD STUFF TO THIS CLASS
+// ==============================
+// Be sure to add it to the STRUCT_TRAITS at the top of ppapi_messages.h.
+struct PPAPI_SHARED_EXPORT DeviceRefData {
+ DeviceRefData();
+
+ PP_DeviceType_Dev type;
+ std::string name;
+ std::string id;
+};
+
+class PPAPI_SHARED_EXPORT PPB_DeviceRef_Shared
+ : public Resource,
+ public thunk::PPB_DeviceRef_API {
+ public:
+ struct InitAsImpl {};
+ struct InitAsProxy {};
+
+ // The dummy arguments control which version of Resource's constructor is
+ // called for this base class.
+ PPB_DeviceRef_Shared(const InitAsImpl&,
+ PP_Instance instance,
+ const DeviceRefData& data);
+ PPB_DeviceRef_Shared(const InitAsProxy&,
+ PP_Instance instance,
+ const DeviceRefData& data);
+
+ // Resource overrides.
+ virtual PPB_DeviceRef_API* AsPPB_DeviceRef_API() OVERRIDE;
+
+ // PPB_DeviceRef_API implementation.
+ virtual const DeviceRefData& GetDeviceRefData() const OVERRIDE;
+ virtual PP_DeviceType_Dev GetType() OVERRIDE;
+ virtual PP_Var GetName() OVERRIDE;
+
+ private:
+ DeviceRefData data_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_DeviceRef_Shared);
+};
+
+} // namespace ppapi
+
+#endif // PPAPI_SHARED_IMPL_PPB_DEVICE_REF_SHARED_H_
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/shared_impl/ppb_device_ref_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698