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

Side by Side Diff: ppapi/proxy/gamepad_resource.h

Issue 1864293002: Convert //ppapi to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more nullptr Created 4 years, 8 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
« no previous file with comments | « ppapi/proxy/flash_font_file_resource.cc ('k') | ppapi/proxy/interface_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 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 be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_PROXY_GAMEPAD_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_GAMEPAD_RESOURCE_H_
6 #define PPAPI_PROXY_GAMEPAD_RESOURCE_H_ 6 #define PPAPI_PROXY_GAMEPAD_RESOURCE_H_
7 7
8 #include <memory>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/shared_memory.h" 12 #include "base/memory/shared_memory.h"
12 #include "ppapi/c/ppb_gamepad.h" 13 #include "ppapi/c/ppb_gamepad.h"
13 #include "ppapi/proxy/plugin_resource.h" 14 #include "ppapi/proxy/plugin_resource.h"
14 #include "ppapi/proxy/ppapi_proxy_export.h" 15 #include "ppapi/proxy/ppapi_proxy_export.h"
15 #include "ppapi/shared_impl/ppb_gamepad_shared.h" 16 #include "ppapi/shared_impl/ppb_gamepad_shared.h"
16 #include "ppapi/thunk/ppb_gamepad_api.h" 17 #include "ppapi/thunk/ppb_gamepad_api.h"
17 18
18 struct PP_GamepadsSampleData; 19 struct PP_GamepadsSampleData;
19 20
20 namespace base { 21 namespace base {
(...skipping 16 matching lines...) Expand all
37 38
38 // Resource implementation. 39 // Resource implementation.
39 thunk::PPB_Gamepad_API* AsPPB_Gamepad_API() override; 40 thunk::PPB_Gamepad_API* AsPPB_Gamepad_API() override;
40 41
41 // PPB_Gamepad_API. 42 // PPB_Gamepad_API.
42 void Sample(PP_Instance instance, PP_GamepadsSampleData* data) override; 43 void Sample(PP_Instance instance, PP_GamepadsSampleData* data) override;
43 44
44 private: 45 private:
45 void OnPluginMsgSendMemory(const ResourceMessageReplyParams& params); 46 void OnPluginMsgSendMemory(const ResourceMessageReplyParams& params);
46 47
47 scoped_ptr<base::SharedMemory> shared_memory_; 48 std::unique_ptr<base::SharedMemory> shared_memory_;
48 const ContentGamepadHardwareBuffer* buffer_; 49 const ContentGamepadHardwareBuffer* buffer_;
49 50
50 // Last data returned so we can use this in the event of a read failure. 51 // Last data returned so we can use this in the event of a read failure.
51 PP_GamepadsSampleData last_read_; 52 PP_GamepadsSampleData last_read_;
52 53
53 DISALLOW_COPY_AND_ASSIGN(GamepadResource); 54 DISALLOW_COPY_AND_ASSIGN(GamepadResource);
54 }; 55 };
55 56
56 } // namespace proxy 57 } // namespace proxy
57 } // namespace ppapi 58 } // namespace ppapi
58 59
59 #endif // PPAPI_PROXY_GAMEPAD_RESOURCE_H_ 60 #endif // PPAPI_PROXY_GAMEPAD_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/flash_font_file_resource.cc ('k') | ppapi/proxy/interface_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698