OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.app.Activity; | 7 import android.app.Activity; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.view.Gravity; | 9 import android.view.Gravity; |
10 import android.view.View; | 10 import android.view.View; |
(...skipping 25 matching lines...) Expand all Loading... |
36 ViewGroup.LayoutParams.MATCH_PARENT, | 36 ViewGroup.LayoutParams.MATCH_PARENT, |
37 Gravity.CENTER)); | 37 Gravity.CENTER)); |
38 } | 38 } |
39 | 39 |
40 @Override | 40 @Override |
41 public void onDestroyContentVideoView() { | 41 public void onDestroyContentVideoView() { |
42 mActivity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCR
EEN); | 42 mActivity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCR
EEN); |
43 } | 43 } |
44 | 44 |
45 @Override | 45 @Override |
| 46 public void keepScreenOn(boolean screenOn) { |
| 47 if (screenOn) { |
| 48 mActivity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_
SCREEN_ON); |
| 49 } else { |
| 50 mActivity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEE
P_SCREEN_ON); |
| 51 } |
| 52 } |
| 53 |
| 54 @Override |
46 public Context getContext() { | 55 public Context getContext() { |
47 return mActivity; | 56 return mActivity; |
48 } | 57 } |
49 | 58 |
50 @Override | 59 @Override |
51 public View getVideoLoadingProgressView() { | 60 public View getVideoLoadingProgressView() { |
52 return null; | 61 return null; |
53 } | 62 } |
54 } | 63 } |
OLD | NEW |