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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java

Issue 2815103004: Android: convert kEnumName to ENUM_NAME in java_cpp_enum.py. (Closed)
Patch Set: Address agrieve@ comments 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
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.graphics.Bitmap; 7 import android.graphics.Bitmap;
8 8
9 import org.chromium.base.Log; 9 import org.chromium.base.Log;
10 import org.chromium.base.annotations.CalledByNative; 10 import org.chromium.base.annotations.CalledByNative;
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 } else { 315 } else {
316 mSeekRequested = true; 316 mSeekRequested = true;
317 mSeekLocation = msec; 317 mSeekLocation = msec;
318 } 318 }
319 } 319 }
320 320
321 private void onRouteAvailabilityChange() { 321 private void onRouteAvailabilityChange() {
322 Log.d(TAG, "onRouteAvailabilityChange: " + mRouteIsAvailable + ", " + mI sPlayable); 322 Log.d(TAG, "onRouteAvailabilityChange: " + mRouteIsAvailable + ", " + mI sPlayable);
323 if (mNativeRemoteMediaPlayerBridge == 0) return; 323 if (mNativeRemoteMediaPlayerBridge == 0) return;
324 324
325 int availability = WebRemotePlaybackAvailability.kDeviceNotAvailable; 325 int availability = WebRemotePlaybackAvailability.DEVICE_NOT_AVAILABLE;
326 if (!mRouteIsAvailable && !mIsPlayable) { 326 if (!mRouteIsAvailable && !mIsPlayable) {
327 availability = WebRemotePlaybackAvailability.kSourceNotSupported; 327 availability = WebRemotePlaybackAvailability.SOURCE_NOT_SUPPORTED;
328 } else if (mRouteIsAvailable && mIsPlayable) { 328 } else if (mRouteIsAvailable && mIsPlayable) {
329 availability = WebRemotePlaybackAvailability.kDeviceAvailable; 329 availability = WebRemotePlaybackAvailability.DEVICE_AVAILABLE;
330 } else if (mRouteIsAvailable) { 330 } else if (mRouteIsAvailable) {
331 // mIsPlayable is false here. 331 // mIsPlayable is false here.
332 availability = WebRemotePlaybackAvailability.kSourceNotCompatible; 332 availability = WebRemotePlaybackAvailability.SOURCE_NOT_COMPATIBLE;
333 } 333 }
334 nativeOnRouteAvailabilityChanged(mNativeRemoteMediaPlayerBridge, availab ility); 334 nativeOnRouteAvailabilityChanged(mNativeRemoteMediaPlayerBridge, availab ility);
335 } 335 }
336 336
337 @CalledByNative 337 @CalledByNative
338 protected void destroy() { 338 protected void destroy() {
339 Log.d(TAG, "destroy"); 339 Log.d(TAG, "destroy");
340 if (mRouteController != null) { 340 if (mRouteController != null) {
341 mRouteController.removeMediaStateListener(mMediaStateListener); 341 mRouteController.removeMediaStateListener(mMediaStateListener);
342 } 342 }
(...skipping 28 matching lines...) Expand all
371 private native String nativeGetTitle(long nativeRemoteMediaPlayerBridge); 371 private native String nativeGetTitle(long nativeRemoteMediaPlayerBridge);
372 private native void nativePauseLocal(long nativeRemoteMediaPlayerBridge); 372 private native void nativePauseLocal(long nativeRemoteMediaPlayerBridge);
373 private native int nativeGetLocalPosition(long nativeRemoteMediaPlayerBridge ); 373 private native int nativeGetLocalPosition(long nativeRemoteMediaPlayerBridge );
374 private native void nativeOnCastStarting(long nativeRemoteMediaPlayerBridge, 374 private native void nativeOnCastStarting(long nativeRemoteMediaPlayerBridge,
375 String castingMessage); 375 String castingMessage);
376 private native void nativeOnCastStarted(long nativeRemoteMediaPlayerBridge); 376 private native void nativeOnCastStarted(long nativeRemoteMediaPlayerBridge);
377 private native void nativeOnCastStopping(long nativeRemoteMediaPlayerBridge) ; 377 private native void nativeOnCastStopping(long nativeRemoteMediaPlayerBridge) ;
378 private native void nativeOnError(long nativeRemoteMediaPlayerBridge); 378 private native void nativeOnError(long nativeRemoteMediaPlayerBridge);
379 private native void nativeOnSeekCompleted(long nativeRemoteMediaPlayerBridge ); 379 private native void nativeOnSeekCompleted(long nativeRemoteMediaPlayerBridge );
380 } 380 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698