Index: content/public/android/java/src/org/chromium/content/browser/ContentClassFactory.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentClassFactory.java b/content/public/android/java/src/org/chromium/content/browser/ContentClassFactory.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0a77762cae9836701040f0a7aac66e627907cf5c |
--- /dev/null |
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentClassFactory.java |
@@ -0,0 +1,40 @@ |
+// Copyright 2017 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. |
+ |
+package org.chromium.content.browser; |
+ |
+import org.chromium.ui.base.WindowAndroid; |
+ |
+/** |
+ * A class factory for content browser layer. |
+ */ |
+public class ContentClassFactory { |
+ private static ContentClassFactory sSingleton; |
+ |
+ /** |
+ * Sets the factory object. |
+ */ |
+ public static void set(ContentClassFactory factory) { |
+ // Should be called on the Browser UI thread. |
+ sSingleton = factory; |
+ } |
+ |
+ /** |
+ * Returns the factory object. |
+ */ |
+ public static ContentClassFactory get() { |
+ // Should be called on the Browser UI thread. |
boliu
2017/03/06 16:56:13
then assert, ThreadUtils has a method to do that i
Tima Vaisburd
2017/03/07 00:45:40
Done.
|
+ if (sSingleton == null) sSingleton = new ContentClassFactory(); |
+ return sSingleton; |
+ } |
+ |
+ /** |
+ * Creates ContextSelectorProvider object. |
+ */ |
+ public ContextSelectionProvider createContextSelectionProvider( |
boliu
2017/03/06 16:56:13
add a protected constructor
Tima Vaisburd
2017/03/07 00:45:40
Done.
|
+ ContextSelectionProvider.ResultCallback callback, WindowAndroid windowAndroid) { |
+ // Implemented by a subclass. |
+ return null; |
+ } |
+} |