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

Side by Side Diff: components/feature_engagement_tracker/public/android/java/src/org/chromium/components/feature_engagement_tracker/FeatureEngagementTracker.java

Issue 2782113002: Add component for feature engagement tracking. (Closed)
Patch Set: Remove multi-line comment and change public component target to source_set Created 3 years, 8 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.components.feature_engagement_tracker;
6
7 import android.support.annotation.CheckResult;
8
9 import org.chromium.base.Callback;
10
11 /**
12 * FeatureEngagementTracker is the Java representation of a native FeatureEngage mentTracker object.
13 * It is owned by the native BrowserContext.
14 *
15 * FeatureEngagementTracker is the core class for the feature engagement tracker .
16 */
17 public interface FeatureEngagementTracker {
18 /**
19 * Must be called whenever an event related to a precondition happens.
20 */
21 void event(String feature, String precondition);
22
23 /**
24 * Must be called whenever a feature has been used.
25 */
26 void used(String feature);
27
28 /**
29 * This function must be called whenever the triggering condition for a
30 * specific feature happens. Returns true iff the display of feature
31 * enlightenment must happen.
32 * If |true| is returned, the caller *must* call dismissed() when display
David Trainor- moved to gerrit 2017/03/29 18:00:06 {@code true}? Also use javadoc style "@return {@c
nyquist 2017/03/30 22:58:54 Done.
33 * of feature enlightenment ends.
34 */
35 @CheckResult
36 boolean trigger(String feature);
37
38 /**
39 * Must be called after display of feature enlightenment finishes.
40 */
41 void dismissed();
42
43 /**
44 * For features that trigger on startup, they register a callback to ensure that they are told
45 * when the tracker has been initialized. The callback will be invoked when the tracker has
David Trainor- moved to gerrit 2017/03/29 18:00:06 Maybe not required for the comment, but the callba
nyquist 2017/03/30 22:58:54 It will be invoked after the DB has been invoked.
46 * been initialized. The boolean parameter indicated whether the initializat ion was a success
47 * and that the tracker is ready to receive calls.
48 */
49 void addOnInitializedCallback(Callback<Boolean> callback);
50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698