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

Side by Side Diff: ui/compositor/test/in_process_context_factory.cc

Issue 819223002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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 #include "ui/compositor/test/in_process_context_factory.h" 5 #include "ui/compositor/test/in_process_context_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 } // namespace 64 } // namespace
65 65
66 InProcessContextFactory::InProcessContextFactory() 66 InProcessContextFactory::InProcessContextFactory()
67 : next_surface_id_namespace_(1u), use_test_surface_(true) { 67 : next_surface_id_namespace_(1u), use_test_surface_(true) {
68 DCHECK_NE(gfx::GetGLImplementation(), gfx::kGLImplementationNone) 68 DCHECK_NE(gfx::GetGLImplementation(), gfx::kGLImplementationNone)
69 << "If running tests, ensure that main() is calling " 69 << "If running tests, ensure that main() is calling "
70 << "gfx::GLSurface::InitializeOneOffForTests()"; 70 << "gfx::GLSurface::InitializeOneOffForTests()";
71 71
72 #if defined(OS_CHROMEOS) 72 #if defined(OS_CHROMEOS)
73 bool use_thread = !CommandLine::ForCurrentProcess()->HasSwitch( 73 bool use_thread = !base::CommandLine::ForCurrentProcess()->HasSwitch(
74 switches::kUIDisableThreadedCompositing); 74 switches::kUIDisableThreadedCompositing);
75 #else 75 #else
76 bool use_thread = false; 76 bool use_thread = false;
77 #endif 77 #endif
78 if (use_thread) { 78 if (use_thread) {
79 compositor_thread_.reset(new base::Thread("Browser Compositor")); 79 compositor_thread_.reset(new base::Thread("Browser Compositor"));
80 compositor_thread_->Start(); 80 compositor_thread_->Start();
81 } 81 }
82 } 82 }
83 83
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 InProcessContextFactory::CreateSurfaceIdAllocator() { 163 InProcessContextFactory::CreateSurfaceIdAllocator() {
164 return make_scoped_ptr( 164 return make_scoped_ptr(
165 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); 165 new cc::SurfaceIdAllocator(next_surface_id_namespace_++));
166 } 166 }
167 167
168 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, 168 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor,
169 const gfx::Size& size) { 169 const gfx::Size& size) {
170 } 170 }
171 171
172 } // namespace ui 172 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/context_factories_for_test.cc ('k') | ui/events/devices/x11/touch_factory_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698