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

Unified Diff: ui/compositor/test/context_factories_for_test.cc

Issue 2563783002: ui + mus: Split ContextFactory into ContextFactory(Client) and ContextFactoryPrivate (Closed)
Patch Set: Restore mash Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/test/context_factories_for_test.h ('k') | ui/compositor/test/in_process_context_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/context_factories_for_test.cc
diff --git a/ui/compositor/test/context_factories_for_test.cc b/ui/compositor/test/context_factories_for_test.cc
index 174f34160cb093c5a16f126fb26613c2fa9797dd..c7b2b27fe192ca9a1481409d2e3f29308b771a6a 100644
--- a/ui/compositor/test/context_factories_for_test.cc
+++ b/ui/compositor/test/context_factories_for_test.cc
@@ -23,7 +23,10 @@ static gl::DisableNullDrawGLBindings* g_disable_null_draw = NULL;
namespace ui {
// static
-ui::ContextFactory* InitializeContextFactoryForTests(bool enable_pixel_output) {
+void InitializeContextFactoryForTests(
+ bool enable_pixel_output,
+ ui::ContextFactory** context_factory,
+ ui::ContextFactoryPrivate** context_factory_private) {
DCHECK(!g_implicit_factory) <<
"ContextFactory for tests already initialized.";
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
@@ -35,7 +38,8 @@ ui::ContextFactory* InitializeContextFactoryForTests(bool enable_pixel_output) {
g_surface_manager = new cc::SurfaceManager;
g_implicit_factory =
new InProcessContextFactory(context_factory_for_test, g_surface_manager);
- return g_implicit_factory;
+ *context_factory = g_implicit_factory;
+ *context_factory_private = g_implicit_factory;
}
void TerminateContextFactoryForTests() {
« no previous file with comments | « ui/compositor/test/context_factories_for_test.h ('k') | ui/compositor/test/in_process_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698