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

Side by Side Diff: ui/ozone/demo/ozone_demo.cc

Issue 922923002: ui: Cleanup the usage of scoped_ptr throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 10 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 | « ui/native_theme/common_theme.cc ('k') | ui/ozone/platform/caca/ozone_platform_caca.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 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 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 211
212 return true; 212 return true;
213 } 213 }
214 214
215 scoped_ptr<ui::Renderer> RendererFactory::CreateRenderer( 215 scoped_ptr<ui::Renderer> RendererFactory::CreateRenderer(
216 gfx::AcceleratedWidget widget, 216 gfx::AcceleratedWidget widget,
217 const gfx::Size& size) { 217 const gfx::Size& size) {
218 switch (type_) { 218 switch (type_) {
219 case GL: 219 case GL:
220 return scoped_ptr<ui::Renderer>(new ui::GlRenderer(widget, size)); 220 return make_scoped_ptr(new ui::GlRenderer(widget, size));
221 case SURFACELESS_GL: 221 case SURFACELESS_GL:
222 return scoped_ptr<ui::Renderer>( 222 return make_scoped_ptr(
223 new ui::SurfacelessGlRenderer(widget, size, &buffer_factory_)); 223 new ui::SurfacelessGlRenderer(widget, size, &buffer_factory_));
224 case SOFTWARE: 224 case SOFTWARE:
225 return scoped_ptr<ui::Renderer>(new ui::SoftwareRenderer(widget, size)); 225 return make_scoped_ptr(new ui::SoftwareRenderer(widget, size));
226 } 226 }
227 227
228 return nullptr; 228 return nullptr;
229 } 229 }
230 230
231 /////////////////////////////////////////////////////////////////////////////// 231 ///////////////////////////////////////////////////////////////////////////////
232 // WindowManager implementation: 232 // WindowManager implementation:
233 233
234 WindowManager::WindowManager(const base::Closure& quit_closure) 234 WindowManager::WindowManager(const base::Closure& quit_closure)
235 : delegate_( 235 : delegate_(
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 ->SetCurrentLayoutByName("us"); 337 ->SetCurrentLayoutByName("us");
338 338
339 base::RunLoop run_loop; 339 base::RunLoop run_loop;
340 340
341 WindowManager window_manager(run_loop.QuitClosure()); 341 WindowManager window_manager(run_loop.QuitClosure());
342 342
343 run_loop.Run(); 343 run_loop.Run();
344 344
345 return 0; 345 return 0;
346 } 346 }
OLDNEW
« no previous file with comments | « ui/native_theme/common_theme.cc ('k') | ui/ozone/platform/caca/ozone_platform_caca.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698