Chromium Code Reviews| Index: content/public/android/java/src/org/chromium/content/browser/factory/ContentClassFactory.java |
| diff --git a/content/public/android/java/src/org/chromium/content/browser/factory/ContentClassFactory.java b/content/public/android/java/src/org/chromium/content/browser/factory/ContentClassFactory.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3bd78233a21b913263368f3c4ad046fa054b7732 |
| --- /dev/null |
| +++ b/content/public/android/java/src/org/chromium/content/browser/factory/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.factory; |
|
boliu
2017/03/03 18:19:09
why different package?
so there's some layering t
Tima Vaisburd
2017/03/04 02:25:07
This is not done yet.
|
| + |
| +import org.chromium.content.browser.ContextSelectionProvider; |
| +import org.chromium.content_public.browser.WebContents; |
| +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) { |
| + sSingleton = factory; |
| + } |
| + |
| + /** |
| + * Returns the factory object. |
| + */ |
| + public static ContentClassFactory get() { |
| + return sSingleton; |
| + } |
| + |
| + /** |
| + * Creates ContextSelectorProvider object. |
| + */ |
| + public ContextSelectionProvider createContextSelectionProvider( |
|
boliu
2017/03/03 18:19:09
abstract
Tima Vaisburd
2017/03/04 02:25:07
Instead I decides to have a regular |if (!signleto
|
| + ContextSelectionProvider.Callback callback, WebContents webContents, |
| + WindowAndroid windowAndroid) { |
| + // Implemented by a subclass. |
| + return null; |
| + } |
| +} |