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

Side by Side Diff: components/test_runner/test_plugin.h

Issue 1921923002: Convert //components/[o-t]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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
« no previous file with comments | « components/test_runner/test_interfaces.h ('k') | components/test_runner/test_plugin.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_
6 #define COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_ 6 #define COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "cc/layers/texture_layer.h" 12 #include "cc/layers/texture_layer.h"
13 #include "cc/layers/texture_layer_client.h" 13 #include "cc/layers/texture_layer_client.h"
14 #include "third_party/WebKit/public/platform/WebExternalTextureLayer.h" 14 #include "third_party/WebKit/public/platform/WebExternalTextureLayer.h"
15 #include "third_party/WebKit/public/platform/WebExternalTextureLayerClient.h" 15 #include "third_party/WebKit/public/platform/WebExternalTextureLayerClient.h"
16 #include "third_party/WebKit/public/platform/WebExternalTextureMailbox.h" 16 #include "third_party/WebKit/public/platform/WebExternalTextureMailbox.h"
17 #include "third_party/WebKit/public/platform/WebLayer.h" 17 #include "third_party/WebKit/public/platform/WebLayer.h"
18 #include "third_party/WebKit/public/web/WebDocument.h" 18 #include "third_party/WebKit/public/web/WebDocument.h"
19 #include "third_party/WebKit/public/web/WebElement.h" 19 #include "third_party/WebKit/public/web/WebElement.h"
20 #include "third_party/WebKit/public/web/WebPlugin.h" 20 #include "third_party/WebKit/public/web/WebPlugin.h"
21 #include "third_party/WebKit/public/web/WebPluginContainer.h" 21 #include "third_party/WebKit/public/web/WebPluginContainer.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 const blink::WebPoint& screen_position) override; 92 const blink::WebPoint& screen_position) override;
93 void didReceiveResponse(const blink::WebURLResponse& response) override {} 93 void didReceiveResponse(const blink::WebURLResponse& response) override {}
94 void didReceiveData(const char* data, int data_length) override {} 94 void didReceiveData(const char* data, int data_length) override {}
95 void didFinishLoading() override {} 95 void didFinishLoading() override {}
96 void didFailLoading(const blink::WebURLError& error) override {} 96 void didFailLoading(const blink::WebURLError& error) override {}
97 bool isPlaceholder() override; 97 bool isPlaceholder() override;
98 98
99 // cc::TextureLayerClient methods: 99 // cc::TextureLayerClient methods:
100 bool PrepareTextureMailbox( 100 bool PrepareTextureMailbox(
101 cc::TextureMailbox* mailbox, 101 cc::TextureMailbox* mailbox,
102 scoped_ptr<cc::SingleReleaseCallback>* release_callback, 102 std::unique_ptr<cc::SingleReleaseCallback>* release_callback,
103 bool use_shared_memory) override; 103 bool use_shared_memory) override;
104 104
105 private: 105 private:
106 TestPlugin(blink::WebFrame* frame, 106 TestPlugin(blink::WebFrame* frame,
107 const blink::WebPluginParams& params, 107 const blink::WebPluginParams& params,
108 WebTestDelegate* delegate); 108 WebTestDelegate* delegate);
109 109
110 enum Primitive { PrimitiveNone, PrimitiveTriangle }; 110 enum Primitive { PrimitiveNone, PrimitiveTriangle };
111 111
112 struct Scene { 112 struct Scene {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 const std::string& fragment_source); 151 const std::string& fragment_source);
152 152
153 // Functions for drawing scene in Software. 153 // Functions for drawing scene in Software.
154 void DrawSceneSoftware(void* memory); 154 void DrawSceneSoftware(void* memory);
155 155
156 blink::WebFrame* frame_; 156 blink::WebFrame* frame_;
157 WebTestDelegate* delegate_; 157 WebTestDelegate* delegate_;
158 blink::WebPluginContainer* container_; 158 blink::WebPluginContainer* container_;
159 159
160 blink::WebRect rect_; 160 blink::WebRect rect_;
161 scoped_ptr<blink::WebGraphicsContext3DProvider> context_provider_; 161 std::unique_ptr<blink::WebGraphicsContext3DProvider> context_provider_;
162 blink::WebGraphicsContext3D* context_; 162 blink::WebGraphicsContext3D* context_;
163 gpu::gles2::GLES2Interface* gl_; 163 gpu::gles2::GLES2Interface* gl_;
164 GLuint color_texture_; 164 GLuint color_texture_;
165 cc::TextureMailbox texture_mailbox_; 165 cc::TextureMailbox texture_mailbox_;
166 scoped_ptr<cc::SharedBitmap> shared_bitmap_; 166 std::unique_ptr<cc::SharedBitmap> shared_bitmap_;
167 bool mailbox_changed_; 167 bool mailbox_changed_;
168 GLuint framebuffer_; 168 GLuint framebuffer_;
169 Scene scene_; 169 Scene scene_;
170 scoped_refptr<cc::TextureLayer> layer_; 170 scoped_refptr<cc::TextureLayer> layer_;
171 scoped_ptr<blink::WebLayer> web_layer_; 171 std::unique_ptr<blink::WebLayer> web_layer_;
172 172
173 blink::WebPluginContainer::TouchEventRequestType touch_event_request_; 173 blink::WebPluginContainer::TouchEventRequestType touch_event_request_;
174 // Requests touch events from the WebPluginContainerImpl multiple times to 174 // Requests touch events from the WebPluginContainerImpl multiple times to
175 // tickle webkit.org/b/108381 175 // tickle webkit.org/b/108381
176 bool re_request_touch_events_; 176 bool re_request_touch_events_;
177 bool print_event_details_; 177 bool print_event_details_;
178 bool print_user_gesture_status_; 178 bool print_user_gesture_status_;
179 bool can_process_drag_; 179 bool can_process_drag_;
180 bool supports_keyboard_focus_; 180 bool supports_keyboard_focus_;
181 181
182 bool is_persistent_; 182 bool is_persistent_;
183 bool can_create_without_renderer_; 183 bool can_create_without_renderer_;
184 184
185 DISALLOW_COPY_AND_ASSIGN(TestPlugin); 185 DISALLOW_COPY_AND_ASSIGN(TestPlugin);
186 }; 186 };
187 187
188 } // namespace test_runner 188 } // namespace test_runner
189 189
190 #endif // COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_ 190 #endif // COMPONENTS_TEST_RUNNER_TEST_PLUGIN_H_
OLDNEW
« no previous file with comments | « components/test_runner/test_interfaces.h ('k') | components/test_runner/test_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698