OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.media; | 5 package org.chromium.media; |
6 | 6 |
7 import android.annotation.TargetApi; | 7 import android.annotation.TargetApi; |
8 import android.app.Activity; | 8 import android.app.Activity; |
9 import android.app.Fragment; | 9 import android.app.Fragment; |
10 import android.app.FragmentManager; | 10 import android.app.FragmentManager; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 private static enum CaptureState { ATTACHED, ALLOWED, STARTED, STOPPING, STO
PPED } | 53 private static enum CaptureState { ATTACHED, ALLOWED, STARTED, STOPPING, STO
PPED } |
54 private static enum DeviceOrientation { PORTRAIT, LANDSCAPE } | 54 private static enum DeviceOrientation { PORTRAIT, LANDSCAPE } |
55 private final Object mCaptureStateLock = new Object(); | 55 private final Object mCaptureStateLock = new Object(); |
56 private CaptureState mCaptureState = CaptureState.STOPPED; | 56 private CaptureState mCaptureState = CaptureState.STOPPED; |
57 | 57 |
58 private MediaProjection mMediaProjection; | 58 private MediaProjection mMediaProjection; |
59 private MediaProjectionManager mMediaProjectionManager; | 59 private MediaProjectionManager mMediaProjectionManager; |
60 private VirtualDisplay mVirtualDisplay; | 60 private VirtualDisplay mVirtualDisplay; |
61 private Surface mSurface; | 61 private Surface mSurface; |
62 private ImageReader mImageReader = null; | 62 private ImageReader mImageReader; |
63 private HandlerThread mThread; | 63 private HandlerThread mThread; |
64 private Handler mBackgroundHandler; | 64 private Handler mBackgroundHandler; |
65 private Display mDisplay; | 65 private Display mDisplay; |
66 private DeviceOrientation mCurrentOrientation; | 66 private DeviceOrientation mCurrentOrientation; |
67 private Intent mResultData; | 67 private Intent mResultData; |
68 | 68 |
69 private int mScreenDensity; | 69 private int mScreenDensity; |
70 private int mWidth; | 70 private int mWidth; |
71 private int mHeight; | 71 private int mHeight; |
72 private int mFormat; | 72 private int mFormat; |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 long timestamp); | 421 long timestamp); |
422 | 422 |
423 // Method for ScreenCapture implementations to notify activity result. | 423 // Method for ScreenCapture implementations to notify activity result. |
424 private native void nativeOnActivityResult( | 424 private native void nativeOnActivityResult( |
425 long nativeScreenCaptureMachineAndroid, boolean result); | 425 long nativeScreenCaptureMachineAndroid, boolean result); |
426 | 426 |
427 // Method for ScreenCapture implementations to notify orientation change. | 427 // Method for ScreenCapture implementations to notify orientation change. |
428 private native void nativeOnOrientationChange( | 428 private native void nativeOnOrientationChange( |
429 long nativeScreenCaptureMachineAndroid, int rotation); | 429 long nativeScreenCaptureMachineAndroid, int rotation); |
430 } | 430 } |
OLD | NEW |