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

Unified Diff: content/browser/aura/image_transport_factory.cc

Issue 140753005: Add the UI compositor to the Mac build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/aura/image_transport_factory.cc
diff --git a/content/browser/aura/image_transport_factory.cc b/content/browser/aura/image_transport_factory.cc
deleted file mode 100644
index 4a20e7d9af19c302c15a047ebf72688fef7a852d..0000000000000000000000000000000000000000
--- a/content/browser/aura/image_transport_factory.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/aura/image_transport_factory.h"
-
-#include "content/browser/aura/gpu_process_transport_factory.h"
-#include "content/browser/aura/no_transport_image_transport_factory.h"
-#include "ui/compositor/compositor.h"
-
-namespace content {
-
-namespace {
-ImageTransportFactory* g_factory = NULL;
-bool g_initialized_for_unit_tests = false;
-}
-
-// static
-void ImageTransportFactory::Initialize() {
- DCHECK(!g_factory || g_initialized_for_unit_tests);
- if (g_initialized_for_unit_tests)
- return;
- g_factory = new GpuProcessTransportFactory;
- ui::ContextFactory::SetInstance(g_factory->AsContextFactory());
-}
-
-void ImageTransportFactory::InitializeForUnitTests(
- scoped_ptr<ui::ContextFactory> test_factory) {
- DCHECK(!g_factory);
- DCHECK(!g_initialized_for_unit_tests);
- g_initialized_for_unit_tests = true;
- g_factory = new NoTransportImageTransportFactory(test_factory.Pass());
- ui::ContextFactory::SetInstance(g_factory->AsContextFactory());
-}
-
-// static
-void ImageTransportFactory::Terminate() {
- ui::ContextFactory::SetInstance(NULL);
- delete g_factory;
- g_factory = NULL;
- g_initialized_for_unit_tests = false;
-}
-
-// static
-ImageTransportFactory* ImageTransportFactory::GetInstance() {
- return g_factory;
-}
-
-} // namespace content
« no previous file with comments | « content/browser/aura/image_transport_factory.h ('k') | content/browser/aura/image_transport_factory_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698