
Implementing an --enable-viz flag will require an ImageTransportFactory that isn't GpuProcessTransportFactory. There is already a function to set an arbitrary test factory. Add ImageTransportFactory::SetFactory() and just use that everywhere instead. Move the test only code into the test factory. Have BrowserMainLoop pass in GpuProcessTransportFactory and tests pass in NoTransportImageTransportFactory. Also cleanup forward declerations and includes on ImageTransportFactory. Bug: 770833 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation Change-Id: I15c4d128fa8840c06d04f336dde2d0d075a00380 Reviewed-on: https://chromium-review.googlesource.com/716696 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: kylechar <kylechar@chromium.org> Cr-Commit-Position: refs/heads/master@{#508440}
23 lines
698 B
C++
23 lines
698 B
C++
// Copyright 2014 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/public/browser/context_factory.h"
|
|
|
|
#include "base/logging.h"
|
|
#include "content/browser/compositor/image_transport_factory.h"
|
|
|
|
namespace content {
|
|
|
|
ui::ContextFactory* GetContextFactory() {
|
|
DCHECK(ImageTransportFactory::GetInstance());
|
|
return ImageTransportFactory::GetInstance()->GetContextFactory();
|
|
}
|
|
|
|
ui::ContextFactoryPrivate* GetContextFactoryPrivate() {
|
|
DCHECK(ImageTransportFactory::GetInstance());
|
|
return ImageTransportFactory::GetInstance()->GetContextFactoryPrivate();
|
|
}
|
|
|
|
} // namespace content
|