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

Side by Side Diff: content/renderer/pepper/pepper_webplugin_impl.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 (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 CONTENT_RENDERER_PEPPER_PEPPER_WEBPLUGIN_IMPL_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_WEBPLUGIN_IMPL_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_WEBPLUGIN_IMPL_H_ 6 #define CONTENT_RENDERER_PEPPER_PEPPER_WEBPLUGIN_IMPL_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/sequenced_task_runner_helpers.h" 14 #include "base/sequenced_task_runner_helpers.h"
15 #include "ppapi/c/pp_var.h" 15 #include "ppapi/c/pp_var.h"
16 #include "third_party/WebKit/public/web/WebPlugin.h" 16 #include "third_party/WebKit/public/web/WebPlugin.h"
17 #include "ui/gfx/geometry/rect.h" 17 #include "ui/gfx/geometry/rect.h"
18 18
19 struct _NPP; 19 struct _NPP;
20 20
21 namespace blink { 21 namespace blink {
22 struct WebPluginParams; 22 struct WebPluginParams;
23 struct WebPrintParams; 23 struct WebPrintParams;
24 } 24 }
25 25
26 namespace content { 26 namespace content {
27 27
28 class PepperPluginInstanceImpl; 28 class PepperPluginInstanceImpl;
29 class PluginInstanceThrottlerImpl; 29 class PluginInstanceThrottlerImpl;
30 class PluginModule; 30 class PluginModule;
31 class PPB_URLLoader_Impl; 31 class PPB_URLLoader_Impl;
32 class RenderFrameImpl; 32 class RenderFrameImpl;
33 33
34 class PepperWebPluginImpl : public blink::WebPlugin { 34 class PepperWebPluginImpl : public blink::WebPlugin {
35 public: 35 public:
36 PepperWebPluginImpl(PluginModule* module, 36 PepperWebPluginImpl(PluginModule* module,
37 const blink::WebPluginParams& params, 37 const blink::WebPluginParams& params,
38 RenderFrameImpl* render_frame, 38 RenderFrameImpl* render_frame,
39 scoped_ptr<PluginInstanceThrottlerImpl> throttler); 39 std::unique_ptr<PluginInstanceThrottlerImpl> throttler);
40 40
41 PepperPluginInstanceImpl* instance() { return instance_.get(); } 41 PepperPluginInstanceImpl* instance() { return instance_.get(); }
42 42
43 // blink::WebPlugin implementation. 43 // blink::WebPlugin implementation.
44 blink::WebPluginContainer* container() const override; 44 blink::WebPluginContainer* container() const override;
45 bool initialize(blink::WebPluginContainer* container) override; 45 bool initialize(blink::WebPluginContainer* container) override;
46 void destroy() override; 46 void destroy() override;
47 v8::Local<v8::Object> v8ScriptableObject(v8::Isolate* isolate) override; 47 v8::Local<v8::Object> v8ScriptableObject(v8::Isolate* isolate) override;
48 void updateAllLifecyclePhases() override {} 48 void updateAllLifecyclePhases() override {}
49 void paint(blink::WebCanvas* canvas, const blink::WebRect& rect) override; 49 void paint(blink::WebCanvas* canvas, const blink::WebRect& rect) override;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 bool canRotateView() override; 82 bool canRotateView() override;
83 void rotateView(RotationType type) override; 83 void rotateView(RotationType type) override;
84 bool isPlaceholder() override; 84 bool isPlaceholder() override;
85 85
86 private: 86 private:
87 friend class base::DeleteHelper<PepperWebPluginImpl>; 87 friend class base::DeleteHelper<PepperWebPluginImpl>;
88 88
89 virtual ~PepperWebPluginImpl(); 89 virtual ~PepperWebPluginImpl();
90 struct InitData; 90 struct InitData;
91 91
92 scoped_ptr<InitData> init_data_; // Cleared upon successful initialization. 92 std::unique_ptr<InitData>
93 init_data_; // Cleared upon successful initialization.
93 // True if the instance represents the entire document in a frame instead of 94 // True if the instance represents the entire document in a frame instead of
94 // being an embedded resource. 95 // being an embedded resource.
95 bool full_frame_; 96 bool full_frame_;
96 scoped_ptr<PluginInstanceThrottlerImpl> throttler_; 97 std::unique_ptr<PluginInstanceThrottlerImpl> throttler_;
97 scoped_refptr<PepperPluginInstanceImpl> instance_; 98 scoped_refptr<PepperPluginInstanceImpl> instance_;
98 gfx::Rect plugin_rect_; 99 gfx::Rect plugin_rect_;
99 PP_Var instance_object_; 100 PP_Var instance_object_;
100 blink::WebPluginContainer* container_; 101 blink::WebPluginContainer* container_;
101 102
102 // TODO(tommycli): Remove once we fix https://crbug.com/588624. 103 // TODO(tommycli): Remove once we fix https://crbug.com/588624.
103 bool destroyed_; 104 bool destroyed_;
104 105
105 DISALLOW_COPY_AND_ASSIGN(PepperWebPluginImpl); 106 DISALLOW_COPY_AND_ASSIGN(PepperWebPluginImpl);
106 }; 107 };
107 108
108 } // namespace content 109 } // namespace content
109 110
110 #endif // CONTENT_RENDERER_PEPPER_PEPPER_WEBPLUGIN_IMPL_H_ 111 #endif // CONTENT_RENDERER_PEPPER_PEPPER_WEBPLUGIN_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_video_source_host.h ('k') | content/renderer/pepper/pepper_webplugin_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698