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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ContentClassFactory.java

Issue 2724363004: Content class factory and generalized text selector (Closed)
Patch Set: Interface cleanup Created 3 years, 9 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 unified diff | Download patch
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698