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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.h

Issue 10386080: Rename nacl::RefCounted to nacl::RefCountedThreadSafe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: License bump Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // be found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_IMAGE_DATA_H_ 5 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_IMAGE_DATA_H_
6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_IMAGE_DATA_H_ 6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_IMAGE_DATA_H_
7 7
8 #include "native_client/src/include/nacl_macros.h" 8 #include "native_client/src/include/nacl_macros.h"
9 #include "native_client/src/shared/ppapi_proxy/plugin_resource.h" 9 #include "native_client/src/shared/ppapi_proxy/plugin_resource.h"
10 #include "ppapi/c/ppb_image_data.h" 10 #include "ppapi/c/ppb_image_data.h"
11 11
12 namespace ppapi_proxy { 12 namespace ppapi_proxy {
13 13
14 // Implements the untrusted side of the PPB_ImageData interface. 14 // Implements the untrusted side of the PPB_ImageData interface.
15 class PluginImageData : public PluginResource { 15 class PluginImageData : public PluginResource {
16 public: 16 public:
17 PluginImageData(); 17 PluginImageData();
18 virtual ~PluginImageData();
19 18
20 static const PPB_ImageData* GetInterface(); 19 static const PPB_ImageData* GetInterface();
21 20
22 bool InitFromBrowserResource(PP_Resource resource); 21 bool InitFromBrowserResource(PP_Resource resource);
23 void* Map(); 22 void* Map();
24 void Unmap(); 23 void Unmap();
25 24
26 const PP_ImageDataDesc& desc() const { return desc_; } 25 const PP_ImageDataDesc& desc() const { return desc_; }
26
27 protected:
28 virtual ~PluginImageData();
29
27 private: 30 private:
28 IMPLEMENT_RESOURCE(PluginImageData);
29 NACL_DISALLOW_COPY_AND_ASSIGN(PluginImageData);
30 PP_ImageDataDesc desc_; 31 PP_ImageDataDesc desc_;
31 int shm_fd_; 32 int shm_fd_;
32 int32_t shm_size_; 33 int32_t shm_size_;
33 void* addr_; 34 void* addr_;
35
36 IMPLEMENT_RESOURCE(PluginImageData);
37 NACL_DISALLOW_COPY_AND_ASSIGN(PluginImageData);
34 }; 38 };
35 39
36 } // namespace ppapi_proxy 40 } // namespace ppapi_proxy
37 41
38 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_IMAGE_DATA_H_ 42 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_IMAGE_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698