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

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

Issue 15035013: Keep screen on when there is an active WebRTC session on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: code review: nits Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698