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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java

Issue 2201483002: Improve transition between opaque and translucent compositor views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed CompositorSurfaceView Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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; 5 package org.chromium.chrome.browser;
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.ActivityManager; 9 import android.app.ActivityManager;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 * See VrShellDelegate#isVrShellEnabled() 1602 * See VrShellDelegate#isVrShellEnabled()
1603 */ 1603 */
1604 @Override 1604 @Override
1605 public boolean isVrShellEnabled() { 1605 public boolean isVrShellEnabled() {
1606 return mVrShellDelegate.isVrShellEnabled(); 1606 return mVrShellDelegate.isVrShellEnabled();
1607 } 1607 }
1608 1608
1609 // TODO(mthiesse): Toggle toolbar overlay, popups, etc. 1609 // TODO(mthiesse): Toggle toolbar overlay, popups, etc.
1610 public void setUIVisibilityForVR(int visibility) { 1610 public void setUIVisibilityForVR(int visibility) {
1611 mControlContainer.setVisibility(visibility); 1611 mControlContainer.setVisibility(visibility);
1612 getCompositorViewHolder().getSurfaceView().setVisibility(visibility); 1612 getCompositorViewHolder().getCompositorView().setVisibility(visibility);
1613 getCompositorViewHolder().setVisibility(visibility); 1613 getCompositorViewHolder().setVisibility(visibility);
1614 } 1614 }
1615 1615
1616 /** 1616 /**
1617 * Reports that a new tab launcher shortcut was selected or an action equiva lent to a shortcut 1617 * Reports that a new tab launcher shortcut was selected or an action equiva lent to a shortcut
1618 * was performed. 1618 * was performed.
1619 * @param isIncognito Whether the shortcut or action created a new incognito tab. 1619 * @param isIncognito Whether the shortcut or action created a new incognito tab.
1620 */ 1620 */
1621 @TargetApi(25) 1621 @TargetApi(25)
1622 private void reportNewTabShortcutUsed(boolean isIncognito) { 1622 private void reportNewTabShortcutUsed(boolean isIncognito) {
1623 if (!BuildInfo.isGreaterThanN()) return; 1623 if (!BuildInfo.isGreaterThanN()) return;
1624 1624
1625 try { 1625 try {
1626 Class<?> clazz = Class.forName("android.content.pm.ShortcutManager") ; 1626 Class<?> clazz = Class.forName("android.content.pm.ShortcutManager") ;
1627 Method method = clazz.getDeclaredMethod("reportShortcutUsed", String .class); 1627 Method method = clazz.getDeclaredMethod("reportShortcutUsed", String .class);
1628 method.invoke(getSystemService(clazz), 1628 method.invoke(getSystemService(clazz),
1629 isIncognito ? "new-incognito-tab-shortcut" : "new-tab-shortc ut"); 1629 isIncognito ? "new-incognito-tab-shortcut" : "new-tab-shortc ut");
1630 } catch (Exception e) { 1630 } catch (Exception e) {
1631 e.printStackTrace(); 1631 e.printStackTrace();
1632 } 1632 }
1633 } 1633 }
1634 1634
1635 public VrShellDelegate getVrShellDelegate() { 1635 public VrShellDelegate getVrShellDelegate() {
1636 return mVrShellDelegate; 1636 return mVrShellDelegate;
1637 } 1637 }
1638 } 1638 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698