OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.media.remote; | 5 package org.chromium.chrome.browser.media.remote; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.content.Intent; | 8 import android.content.Intent; |
9 import android.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
10 import android.graphics.Color; | 10 import android.graphics.Color; |
(...skipping 13 matching lines...) Expand all Loading... | |
24 | 24 |
25 import com.google.android.gms.cast.CastMediaControlIntent; | 25 import com.google.android.gms.cast.CastMediaControlIntent; |
26 | 26 |
27 import org.chromium.chrome.R; | 27 import org.chromium.chrome.R; |
28 import org.chromium.chrome.browser.media.remote.RemoteVideoInfo.PlayerState; | 28 import org.chromium.chrome.browser.media.remote.RemoteVideoInfo.PlayerState; |
29 import org.chromium.third_party.android.media.MediaController; | 29 import org.chromium.third_party.android.media.MediaController; |
30 | 30 |
31 /** | 31 /** |
32 * The activity that's opened by clicking the video flinging (casting) notificat ion. | 32 * The activity that's opened by clicking the video flinging (casting) notificat ion. |
33 * | 33 * |
34 * TODO(cimamoglu): Refactor to merge some common logic with {@link TransportCon trol}. | 34 * TODO(cimamoglu): Refactor to merge some common logic with {@link CastNotifica tionControl}. |
whywhat
2016/02/01 20:54:14
I doubt Cihat will ever fix this, maybe change the
aberent
2016/02/02 14:31:11
Done, assuming we don't get rid of this completely
| |
35 */ | 35 */ |
36 public class ExpandedControllerActivity | 36 public class ExpandedControllerActivity |
37 extends FragmentActivity implements MediaRouteController.UiListener { | 37 extends FragmentActivity implements MediaRouteController.UiListener { |
38 private static final int PROGRESS_UPDATE_PERIOD_IN_MS = 1000; | 38 private static final int PROGRESS_UPDATE_PERIOD_IN_MS = 1000; |
39 // The alpha value for the poster/placeholder image, an integer between 0 an d 256 (opaque). | 39 // The alpha value for the poster/placeholder image, an integer between 0 an d 256 (opaque). |
40 private static final int POSTER_IMAGE_ALPHA = 200; | 40 private static final int POSTER_IMAGE_ALPHA = 200; |
41 | 41 |
42 private Handler mHandler; | 42 private Handler mHandler; |
43 // We don't use the standard android.media.MediaController, but a custom one . | 43 // We don't use the standard android.media.MediaController, but a custom one . |
44 // See the class itself for details. | 44 // See the class itself for details. |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
350 * @param context the Context to start this activity within. | 350 * @param context the Context to start this activity within. |
351 */ | 351 */ |
352 public static void startActivity(Context context) { | 352 public static void startActivity(Context context) { |
353 if (context == null) return; | 353 if (context == null) return; |
354 | 354 |
355 Intent intent = new Intent(context, ExpandedControllerActivity.class); | 355 Intent intent = new Intent(context, ExpandedControllerActivity.class); |
356 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | 356 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
357 context.startActivity(intent); | 357 context.startActivity(intent); |
358 } | 358 } |
359 } | 359 } |
OLD | NEW |