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

Side by Side Diff: content/public/test/test_renderer_host.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 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 #include "content/public/test/test_renderer_host.h" 5 #include "content/public/test/test_renderer_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 ContextProviderFactoryImpl::Initialize(gpu_channel_factory_.get()); 245 ContextProviderFactoryImpl::Initialize(gpu_channel_factory_.get());
246 ui::ContextProviderFactory::SetInstance( 246 ui::ContextProviderFactory::SetInstance(
247 ContextProviderFactoryImpl::GetInstance()); 247 ContextProviderFactoryImpl::GetInstance());
248 if (!screen_) 248 if (!screen_)
249 screen_.reset(ui::CreateDummyScreenAndroid()); 249 screen_.reset(ui::CreateDummyScreenAndroid());
250 display::Screen::SetScreenInstance(screen_.get()); 250 display::Screen::SetScreenInstance(screen_.get());
251 #endif 251 #endif
252 #if defined(USE_AURA) 252 #if defined(USE_AURA)
253 ui::ContextFactory* context_factory = 253 ui::ContextFactory* context_factory =
254 ImageTransportFactory::GetInstance()->GetContextFactory(); 254 ImageTransportFactory::GetInstance()->GetContextFactory();
255 ui::ContextFactoryPrivate* context_factory_private =
256 ImageTransportFactory::GetInstance()->GetContextFactoryPrivate();
255 257
256 aura_test_helper_.reset( 258 aura_test_helper_.reset(
257 new aura::test::AuraTestHelper(base::MessageLoopForUI::current())); 259 new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
258 aura_test_helper_->SetUp(context_factory); 260 aura_test_helper_->SetUp(context_factory, context_factory_private);
259 new wm::DefaultActivationClient(aura_test_helper_->root_window()); 261 new wm::DefaultActivationClient(aura_test_helper_->root_window());
260 #endif 262 #endif
261 263
262 sanity_checker_.reset(new ContentBrowserSanityChecker()); 264 sanity_checker_.reset(new ContentBrowserSanityChecker());
263 265
264 DCHECK(!browser_context_); 266 DCHECK(!browser_context_);
265 browser_context_.reset(CreateBrowserContext()); 267 browser_context_.reset(CreateBrowserContext());
266 268
267 SetContents(CreateTestWebContents()); 269 SetContents(CreateTestWebContents());
268 270
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { 325 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() {
324 return new TestBrowserContext(); 326 return new TestBrowserContext();
325 } 327 }
326 328
327 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 329 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
328 RenderProcessHostFactory* factory) { 330 RenderProcessHostFactory* factory) {
329 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); 331 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory);
330 } 332 }
331 333
332 } // namespace content 334 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/context_factory.h ('k') | extensions/shell/browser/shell_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698