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.ui.base.WindowAndroid; | |
8 | |
9 /** | |
10 * A class factory for content browser layer. | |
11 */ | |
12 public class ContentClassFactory { | |
13 private static ContentClassFactory sSingleton; | |
14 | |
15 /** | |
16 * Sets the factory object. | |
17 */ | |
18 public static void set(ContentClassFactory factory) { | |
19 // Should be called on the Browser UI thread. | |
20 sSingleton = factory; | |
21 } | |
22 | |
23 /** | |
24 * Returns the factory object. | |
25 */ | |
26 public static ContentClassFactory get() { | |
27 // 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.
| |
28 if (sSingleton == null) sSingleton = new ContentClassFactory(); | |
29 return sSingleton; | |
30 } | |
31 | |
32 /** | |
33 * Creates ContextSelectorProvider object. | |
34 */ | |
35 public ContextSelectionProvider createContextSelectionProvider( | |
boliu
2017/03/06 16:56:13
add a protected constructor
Tima Vaisburd
2017/03/07 00:45:40
Done.
| |
36 ContextSelectionProvider.ResultCallback callback, WindowAndroid wind owAndroid) { | |
37 // Implemented by a subclass. | |
38 return null; | |
39 } | |
40 } | |
OLD | NEW |