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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/MediaResourceGetter.java

Issue 652603004: Fix Java Checkstyle issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issues in DeviceSensors Created 6 years, 2 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.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.pm.PackageManager; 9 import android.content.pm.PackageManager;
10 import android.media.MediaMetadataRetriever; 10 import android.media.MediaMetadataRetriever;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 mDurationInMilliseconds = durationInMilliseconds; 49 mDurationInMilliseconds = durationInMilliseconds;
50 mWidth = width; 50 mWidth = width;
51 mHeight = height; 51 mHeight = height;
52 mSuccess = success; 52 mSuccess = success;
53 } 53 }
54 54
55 // TODO(andrewhayden): according to the spec, if duration is unknown 55 // TODO(andrewhayden): according to the spec, if duration is unknown
56 // then we must return NaN. If it is unbounded, then positive infinity. 56 // then we must return NaN. If it is unbounded, then positive infinity.
57 // http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html 57 // http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html
58 @CalledByNative("MediaMetadata") 58 @CalledByNative("MediaMetadata")
59 int getDurationInMilliseconds() { return mDurationInMilliseconds; } 59 int getDurationInMilliseconds() {
60 return mDurationInMilliseconds;
61 }
60 62
61 @CalledByNative("MediaMetadata") 63 @CalledByNative("MediaMetadata")
62 int getWidth() { return mWidth; } 64 int getWidth() {
65 return mWidth;
66 }
63 67
64 @CalledByNative("MediaMetadata") 68 @CalledByNative("MediaMetadata")
65 int getHeight() { return mHeight; } 69 int getHeight() {
70 return mHeight;
71 }
66 72
67 @CalledByNative("MediaMetadata") 73 @CalledByNative("MediaMetadata")
68 boolean isSuccess() { return mSuccess; } 74 boolean isSuccess() {
75 return mSuccess;
76 }
69 77
70 @Override 78 @Override
71 public String toString() { 79 public String toString() {
72 return "MediaMetadata[" 80 return "MediaMetadata["
73 + "durationInMilliseconds=" + mDurationInMilliseconds 81 + "durationInMilliseconds=" + mDurationInMilliseconds
74 + ", width=" + mWidth 82 + ", width=" + mWidth
75 + ", height=" + mHeight 83 + ", height=" + mHeight
76 + ", success=" + mSuccess 84 + ", success=" + mSuccess
77 + "]"; 85 + "]";
78 } 86 }
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 @VisibleForTesting 420 @VisibleForTesting
413 void configure(String path) { 421 void configure(String path) {
414 mRetriever.setDataSource(path); 422 mRetriever.setDataSource(path);
415 } 423 }
416 424
417 @VisibleForTesting 425 @VisibleForTesting
418 String extractMetadata(int key) { 426 String extractMetadata(int key) {
419 return mRetriever.extractMetadata(key); 427 return mRetriever.extractMetadata(key);
420 } 428 }
421 } 429 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698