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

Side by Side Diff: content/renderer/pepper/pepper_compositor_host.h

Issue 1873783003: Convert //content/renderer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_RENDERER_PEPPER_PEPPER_COMPOSITOR_HOST_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_COMPOSITOR_HOST_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_COMPOSITOR_HOST_H_ 6 #define CONTENT_RENDERER_PEPPER_PEPPER_COMPOSITOR_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
14 #include "ppapi/host/host_message_context.h" 15 #include "ppapi/host/host_message_context.h"
15 #include "ppapi/host/resource_host.h" 16 #include "ppapi/host/resource_host.h"
16 #include "ppapi/shared_impl/compositor_layer_data.h" 17 #include "ppapi/shared_impl/compositor_layer_data.h"
17 18
18 namespace base { 19 namespace base {
19 class SharedMemory; 20 class SharedMemory;
20 } // namespace 21 } // namespace
21 22
22 namespace cc { 23 namespace cc {
(...skipping 22 matching lines...) Expand all
45 // repaint of the page will also be scheduled. Failure means that the device 46 // repaint of the page will also be scheduled. Failure means that the device
46 // is already bound to a different instance, and nothing will happen. 47 // is already bound to a different instance, and nothing will happen.
47 bool BindToInstance(PepperPluginInstanceImpl* new_instance); 48 bool BindToInstance(PepperPluginInstanceImpl* new_instance);
48 49
49 const scoped_refptr<cc::Layer> layer() { return layer_; }; 50 const scoped_refptr<cc::Layer> layer() { return layer_; };
50 51
51 void ViewInitiatedPaint(); 52 void ViewInitiatedPaint();
52 53
53 private: 54 private:
54 void ImageReleased(int32_t id, 55 void ImageReleased(int32_t id,
55 scoped_ptr<base::SharedMemory> shared_memory, 56 std::unique_ptr<base::SharedMemory> shared_memory,
56 scoped_ptr<cc::SharedBitmap> bitmap, 57 std::unique_ptr<cc::SharedBitmap> bitmap,
57 const gpu::SyncToken& sync_token, 58 const gpu::SyncToken& sync_token,
58 bool is_lost); 59 bool is_lost);
59 void ResourceReleased(int32_t id, 60 void ResourceReleased(int32_t id,
60 const gpu::SyncToken& sync_token, 61 const gpu::SyncToken& sync_token,
61 bool is_lost); 62 bool is_lost);
62 void SendCommitLayersReplyIfNecessary(); 63 void SendCommitLayersReplyIfNecessary();
63 void UpdateLayer(const scoped_refptr<cc::Layer>& layer, 64 void UpdateLayer(const scoped_refptr<cc::Layer>& layer,
64 const ppapi::CompositorLayerData* old_layer, 65 const ppapi::CompositorLayerData* old_layer,
65 const ppapi::CompositorLayerData* new_layer, 66 const ppapi::CompositorLayerData* new_layer,
66 scoped_ptr<base::SharedMemory> image_shm); 67 std::unique_ptr<base::SharedMemory> image_shm);
67 68
68 // ResourceMessageHandler overrides: 69 // ResourceMessageHandler overrides:
69 int32_t OnResourceMessageReceived( 70 int32_t OnResourceMessageReceived(
70 const IPC::Message& msg, 71 const IPC::Message& msg,
71 ppapi::host::HostMessageContext* context) override; 72 ppapi::host::HostMessageContext* context) override;
72 73
73 // ppapi::host::ResourceHost overrides: 74 // ppapi::host::ResourceHost overrides:
74 bool IsCompositorHost() override; 75 bool IsCompositorHost() override;
75 76
76 // Message handlers: 77 // Message handlers:
(...skipping 25 matching lines...) Expand all
102 ppapi::host::ReplyMessageContext commit_layers_reply_context_; 103 ppapi::host::ReplyMessageContext commit_layers_reply_context_;
103 104
104 base::WeakPtrFactory<PepperCompositorHost> weak_factory_; 105 base::WeakPtrFactory<PepperCompositorHost> weak_factory_;
105 106
106 DISALLOW_COPY_AND_ASSIGN(PepperCompositorHost); 107 DISALLOW_COPY_AND_ASSIGN(PepperCompositorHost);
107 }; 108 };
108 109
109 } // namespace content 110 } // namespace content
110 111
111 #endif // CONTENT_RENDERER_PEPPER_PEPPER_COMPOSITOR_HOST_H_ 112 #endif // CONTENT_RENDERER_PEPPER_PEPPER_COMPOSITOR_HOST_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_camera_device_host.h ('k') | content/renderer/pepper/pepper_compositor_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698