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

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

Issue 2878403002: Support setting mouse cursor icon in Android N. (Closed)
Patch Set: Override onResolvePointerIcon Created 3 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.fullscreen; 5 package org.chromium.chrome.browser.fullscreen;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.res.Resources; 8 import android.content.res.Resources;
9 import android.os.Build;
9 import android.view.Gravity; 10 import android.view.Gravity;
10 import android.view.MotionEvent; 11 import android.view.MotionEvent;
11 import android.view.View; 12 import android.view.View;
12 import android.view.ViewGroup; 13 import android.view.ViewGroup;
13 import android.view.ViewGroup.LayoutParams; 14 import android.view.ViewGroup.LayoutParams;
14 import android.view.Window; 15 import android.view.Window;
15 import android.widget.FrameLayout; 16 import android.widget.FrameLayout;
16 17
17 import org.chromium.base.ActivityState; 18 import org.chromium.base.ActivityState;
18 import org.chromium.base.ApplicationStatus; 19 import org.chromium.base.ApplicationStatus;
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 } 518 }
518 519
519 // Whether we need the compositor to draw again to update our animat ion. 520 // Whether we need the compositor to draw again to update our animat ion.
520 // Should be |false| when the browser controls are only moved throug h the page 521 // Should be |false| when the browser controls are only moved throug h the page
521 // scrolling. 522 // scrolling.
522 boolean needsAnimate = shouldShowAndroidControls(); 523 boolean needsAnimate = shouldShowAndroidControls();
523 for (int i = 0; i < mListeners.size(); i++) { 524 for (int i = 0; i < mListeners.size(); i++) {
524 mListeners.get(i).onControlsOffsetChanged( 525 mListeners.get(i).onControlsOffsetChanged(
525 getTopControlOffset(), getBottomControlOffset(), needsAn imate); 526 getTopControlOffset(), getBottomControlOffset(), needsAn imate);
526 } 527 }
528
529 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
Ted C 2017/07/21 00:15:25 why is this needed? this is while the top control
jaebaek 2017/07/21 10:03:04 The view is still present at its location (i.e., t
Ted C 2017/07/21 18:45:31 Since the controlcontainer is a child of the coord
jaebaek 2017/07/24 07:34:11 You are right. I dropped this code.
530 if (offset != 0.0f && mPreviousControlOffset == 0.0f) {
531 mControlContainer.getView().setPointerIcon(null);
532 }
533 }
527 } 534 }
528 535
529 final Tab tab = getTab(); 536 final Tab tab = getTab();
530 if (tab != null && areBrowserControlsOffScreen() && mIsEnteringPersisten tModeState) { 537 if (tab != null && areBrowserControlsOffScreen() && mIsEnteringPersisten tModeState) {
531 getHtmlApiHandler().enterFullscreen(tab); 538 getHtmlApiHandler().enterFullscreen(tab);
532 mIsEnteringPersistentModeState = false; 539 mIsEnteringPersistentModeState = false;
533 } 540 }
534 541
535 updateContentViewChildrenState(); 542 updateContentViewChildrenState();
536 543
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 updateVisuals(); 675 updateVisuals();
669 } 676 }
670 } 677 }
671 678
672 @Override 679 @Override
673 public void onContentViewScrollingStateChanged(boolean scrolling) { 680 public void onContentViewScrollingStateChanged(boolean scrolling) {
674 mContentViewScrolling = scrolling; 681 mContentViewScrolling = scrolling;
675 if (!scrolling) updateVisuals(); 682 if (!scrolling) updateVisuals();
676 } 683 }
677 } 684 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698