2014-03-29 02:36:55 +04:00
|
|
|
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
package org.mozilla.gecko;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Holds data definitions for our UI Telemetry implementation.
|
|
|
|
*/
|
|
|
|
public interface TelemetryContract {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Holds event names. Intended for use with
|
|
|
|
* Telemetry.sendUIEvent() as the "action" parameter.
|
|
|
|
*/
|
2014-04-10 06:06:01 +04:00
|
|
|
public interface Event {
|
|
|
|
// Outcome of data policy notification: can be true or false.
|
|
|
|
public static final String POLICY_NOTIFICATION_SUCCESS = "policynotification.success.1:";
|
2014-04-03 02:16:47 +04:00
|
|
|
|
|
|
|
// Top site pinned.
|
|
|
|
public static final String TOP_SITES_PIN = "pin.1";
|
|
|
|
|
|
|
|
// Top site un-pinned.
|
|
|
|
public static final String TOP_SITES_UNPIN = "unpin.1";
|
|
|
|
|
|
|
|
// Top site edited.
|
|
|
|
public static final String TOP_SITES_EDIT = "edit.1";
|
2014-04-03 03:25:04 +04:00
|
|
|
|
|
|
|
// Set default panel.
|
|
|
|
public static final String PANEL_SET_DEFAULT = "setdefault.1";
|
2014-04-29 16:04:10 +04:00
|
|
|
|
2014-05-02 06:02:29 +04:00
|
|
|
// Sharing content.
|
|
|
|
public static final String SHARE = "share.1";
|
|
|
|
|
2014-04-29 16:04:10 +04:00
|
|
|
// Sanitizing private data.
|
|
|
|
public static final String SANITIZE = "sanitize.1";
|
2014-05-02 06:10:08 +04:00
|
|
|
|
|
|
|
// Saving a resource (reader, bookmark, etc) for viewing later.
|
|
|
|
// Note: Only used in JavaScript for now, but here for completeness.
|
|
|
|
public static final String SAVE = "save.1";
|
|
|
|
|
|
|
|
// Stop holding a resource (reader, bookmark, etc) for viewing later.
|
|
|
|
// Note: Only used in JavaScript for now, but here for completeness.
|
|
|
|
public static final String UNSAVE = "unsave.1";
|
2014-04-10 06:06:01 +04:00
|
|
|
}
|
2014-03-29 02:36:55 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Holds event methods. Intended for use in
|
|
|
|
* Telemetry.sendUIEvent() as the "method" parameter.
|
|
|
|
*/
|
2014-04-29 16:04:10 +04:00
|
|
|
public interface Method {
|
2014-05-02 06:02:29 +04:00
|
|
|
// Action triggered from a list.
|
|
|
|
public static final String LIST = "list";
|
|
|
|
|
|
|
|
// Action triggered from a button.
|
|
|
|
public static final String BUTTON = "button";
|
|
|
|
|
2014-04-29 16:04:10 +04:00
|
|
|
// Action triggered from a dialog.
|
|
|
|
public static final String DIALOG = "dialog";
|
|
|
|
}
|
2014-03-29 02:36:55 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Holds session names. Intended for use with
|
|
|
|
* Telemetry.startUISession() as the "sessionName" parameter.
|
|
|
|
*/
|
|
|
|
public interface Session {
|
|
|
|
// Started when a user enters about:home.
|
|
|
|
public static final String HOME = "home.1";
|
2014-03-29 02:37:39 +04:00
|
|
|
|
|
|
|
// Started when a user enters a given home panel.
|
|
|
|
// Session name is dynamic, encoded as "homepanel.1:<panel_id>"
|
|
|
|
public static final String HOME_PANEL = "homepanel.1:";
|
2014-05-02 06:10:08 +04:00
|
|
|
|
|
|
|
// Started when a Reader viewer becomes active in the foreground.
|
|
|
|
// Note: Only used in JavaScript for now, but here for completeness.
|
|
|
|
public static final String READER = "reader.1";
|
2014-03-29 02:36:55 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Holds reasons for stopping a session. Intended for use in
|
|
|
|
* Telemetry.stopUISession() as the "reason" parameter.
|
|
|
|
*/
|
|
|
|
public interface Reason {}
|
|
|
|
}
|