| Index: chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaInfo.java
 | 
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaInfo.java
 | 
| new file mode 100644
 | 
| index 0000000000000000000000000000000000000000..1fbc9358636ec3cb77b6eacacd3b03dbfe17a852
 | 
| --- /dev/null
 | 
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaInfo.java
 | 
| @@ -0,0 +1,79 @@
 | 
| +// Copyright 2015 The Chromium Authors. All rights reserved.
 | 
| +// Use of this source code is governed by a BSD-style license that can be
 | 
| +// found in the LICENSE file.
 | 
| +
 | 
| +package org.chromium.chrome.browser.media.ui;
 | 
| +
 | 
| +import android.text.TextUtils;
 | 
| +
 | 
| +/**
 | 
| + * Exposes information about the current media to the external clients.
 | 
| + */
 | 
| +public class MediaInfo {
 | 
| +    /**
 | 
| +     * The title of the media
 | 
| +     */
 | 
| +    public String title;
 | 
| +
 | 
| +    /**
 | 
| +     * The current state of the media, paused or not.
 | 
| +     */
 | 
| +    public boolean isPaused;
 | 
| +
 | 
| +    /**
 | 
| +     * The origin (scheme + host) of the tab containing the media
 | 
| +     */
 | 
| +    public String origin;
 | 
| +
 | 
| +    /**
 | 
| +     * The id of the tab containing the media
 | 
| +     */
 | 
| +    public int tabId;
 | 
| +
 | 
| +    /**
 | 
| +     * Create a new MediaInfo
 | 
| +     * @param title
 | 
| +     * @param state
 | 
| +     * @param origin
 | 
| +     * @param tabId
 | 
| +     */
 | 
| +    public MediaInfo(
 | 
| +            String title,
 | 
| +            boolean isPaused,
 | 
| +            String origin,
 | 
| +            int tabId) {
 | 
| +        this.title = title;
 | 
| +        this.isPaused = isPaused;
 | 
| +        this.origin = origin;
 | 
| +        this.tabId = tabId;
 | 
| +    }
 | 
| +
 | 
| +    /**
 | 
| +     * Copy a media info
 | 
| +     * @param other the source.
 | 
| +     */
 | 
| +    public MediaInfo(MediaInfo other) {
 | 
| +        this(other.title, other.isPaused, other.origin, other.tabId);
 | 
| +    }
 | 
| +
 | 
| +    @Override
 | 
| +    public boolean equals(Object obj) {
 | 
| +        if (obj == this) return true;
 | 
| +        if (!(obj instanceof MediaInfo)) return false;
 | 
| +
 | 
| +        MediaInfo other = (MediaInfo) obj;
 | 
| +        return isPaused == other.isPaused
 | 
| +                && tabId == other.tabId
 | 
| +                && TextUtils.equals(title, other.title)
 | 
| +                && TextUtils.equals(origin, other.origin);
 | 
| +    }
 | 
| +
 | 
| +    @Override
 | 
| +    public int hashCode() {
 | 
| +        int result = isPaused ? 1 : 0;
 | 
| +        result = 31 * result + (title == null ? 0 : title.hashCode());
 | 
| +        result = 31 * result + (origin == null ? 0 : origin.hashCode());
 | 
| +        result = 31 * result + tabId;
 | 
| +        return result;
 | 
| +    }
 | 
| +}
 | 
| 
 |