OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package org.chromium.content.browser; |
| 6 |
| 7 import org.chromium.base.ThreadUtils; |
| 8 import org.chromium.ui.base.WindowAndroid; |
| 9 |
| 10 /** |
| 11 * A class factory for content browser layer. |
| 12 */ |
| 13 public class ContentClassFactory { |
| 14 private static ContentClassFactory sSingleton; |
| 15 |
| 16 /** |
| 17 * Sets the factory object. |
| 18 */ |
| 19 public static void set(ContentClassFactory factory) { |
| 20 ThreadUtils.assertOnUiThread(); |
| 21 |
| 22 sSingleton = factory; |
| 23 } |
| 24 |
| 25 /** |
| 26 * Returns the factory object. |
| 27 */ |
| 28 public static ContentClassFactory get() { |
| 29 ThreadUtils.assertOnUiThread(); |
| 30 |
| 31 if (sSingleton == null) sSingleton = new ContentClassFactory(); |
| 32 return sSingleton; |
| 33 } |
| 34 |
| 35 /** |
| 36 * Constructor. |
| 37 */ |
| 38 protected ContentClassFactory() {} |
| 39 |
| 40 /** |
| 41 * Creates ContextSelectorProvider object. |
| 42 */ |
| 43 public ContextSelectionProvider createContextSelectionProvider( |
| 44 ContextSelectionProvider.ResultCallback callback, WindowAndroid wind
owAndroid) { |
| 45 // Implemented by a subclass. |
| 46 return null; |
| 47 } |
| 48 } |
OLD | NEW |