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

Side by Side Diff: content/renderer/pepper/pepper_compositor_host.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
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 "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 20 matching lines...) Expand all
31 namespace content { 31 namespace content {
32 32
33 class PepperPluginInstanceImpl; 33 class PepperPluginInstanceImpl;
34 class RendererPpapiHost; 34 class RendererPpapiHost;
35 35
36 class PepperCompositorHost : public ppapi::host::ResourceHost { 36 class PepperCompositorHost : public ppapi::host::ResourceHost {
37 public: 37 public:
38 PepperCompositorHost(RendererPpapiHost* host, 38 PepperCompositorHost(RendererPpapiHost* host,
39 PP_Instance instance, 39 PP_Instance instance,
40 PP_Resource resource); 40 PP_Resource resource);
41 ~PepperCompositorHost() override;
42
41 // Associates this device with the given plugin instance. You can pass NULL 43 // Associates this device with the given plugin instance. You can pass NULL
42 // to clear the existing device. Returns true on success. In this case, a 44 // to clear the existing device. Returns true on success. In this case, a
43 // repaint of the page will also be scheduled. Failure means that the device 45 // repaint of the page will also be scheduled. Failure means that the device
44 // is already bound to a different instance, and nothing will happen. 46 // is already bound to a different instance, and nothing will happen.
45 bool BindToInstance(PepperPluginInstanceImpl* new_instance); 47 bool BindToInstance(PepperPluginInstanceImpl* new_instance);
46 48
47 const scoped_refptr<cc::Layer> layer() { return layer_; }; 49 const scoped_refptr<cc::Layer> layer() { return layer_; };
48 50
49 void ViewInitiatedPaint(); 51 void ViewInitiatedPaint();
50 52
51 private: 53 private:
52 ~PepperCompositorHost() override;
53
54 void ImageReleased(int32_t id, 54 void ImageReleased(int32_t id,
55 scoped_ptr<base::SharedMemory> shared_memory, 55 scoped_ptr<base::SharedMemory> shared_memory,
56 scoped_ptr<cc::SharedBitmap> bitmap, 56 scoped_ptr<cc::SharedBitmap> bitmap,
57 const gpu::SyncToken& sync_token, 57 const gpu::SyncToken& sync_token,
58 bool is_lost); 58 bool is_lost);
59 void ResourceReleased(int32_t id, 59 void ResourceReleased(int32_t id,
60 const gpu::SyncToken& sync_token, 60 const gpu::SyncToken& sync_token,
61 bool is_lost); 61 bool is_lost);
62 void SendCommitLayersReplyIfNecessary(); 62 void SendCommitLayersReplyIfNecessary();
63 void UpdateLayer(const scoped_refptr<cc::Layer>& layer, 63 void UpdateLayer(const scoped_refptr<cc::Layer>& layer,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 ppapi::host::ReplyMessageContext commit_layers_reply_context_; 102 ppapi::host::ReplyMessageContext commit_layers_reply_context_;
103 103
104 base::WeakPtrFactory<PepperCompositorHost> weak_factory_; 104 base::WeakPtrFactory<PepperCompositorHost> weak_factory_;
105 105
106 DISALLOW_COPY_AND_ASSIGN(PepperCompositorHost); 106 DISALLOW_COPY_AND_ASSIGN(PepperCompositorHost);
107 }; 107 };
108 108
109 } // namespace content 109 } // namespace content
110 110
111 #endif // CONTENT_RENDERER_PEPPER_PEPPER_COMPOSITOR_HOST_H_ 111 #endif // CONTENT_RENDERER_PEPPER_PEPPER_COMPOSITOR_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698