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

Unified Diff: ui/android/context_provider_factory.cc

Issue 2190033002: content: Add ContextProviderFactory to create a render ContextProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 4 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: ui/android/context_provider_factory.cc
diff --git a/ui/android/context_provider_factory.cc b/ui/android/context_provider_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b3e28089c8e23d7060802ceb6fd9b090f1369f97
--- /dev/null
+++ b/ui/android/context_provider_factory.cc
@@ -0,0 +1,30 @@
+// Copyright 2016 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 "ui/android/context_provider_factory.h"
+
+#include "cc/output/context_provider.h"
+
+namespace ui {
+
+ContextProviderFactory* g_context_provider_factory = nullptr;
David Trainor- moved to gerrit 2016/08/03 21:48:13 anonymous namespace?
Khushal 2016/08/04 18:55:14 Done.
+
+// static
+ContextProviderFactory* ContextProviderFactory::GetInstance() {
+ return g_context_provider_factory;
+}
+
+// static
+void ContextProviderFactory::SetInstance(
+ ContextProviderFactory* context_provider_factory) {
+ DCHECK(!g_context_provider_factory || !context_provider_factory);
+
+ g_context_provider_factory = context_provider_factory;
+}
+
+ContextProviderFactory::ContextProviders::ContextProviders() = default;
+
+ContextProviderFactory::ContextProviders::~ContextProviders() = default;
+
+} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698