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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java

Issue 2878403002: Support setting mouse cursor icon in Android N. (Closed)
Patch Set: nit Created 3 years, 6 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.compositor.bottombar; 5 package org.chromium.chrome.browser.compositor.bottombar;
6 6
7 import android.os.Build;
7 import android.text.TextUtils; 8 import android.text.TextUtils;
9 import android.view.PointerIcon;
8 import android.view.View; 10 import android.view.View;
9 import android.view.View.MeasureSpec; 11 import android.view.View.MeasureSpec;
10 import android.view.ViewGroup; 12 import android.view.ViewGroup;
11 13
12 import org.chromium.base.VisibleForTesting; 14 import org.chromium.base.VisibleForTesting;
13 import org.chromium.base.annotations.CalledByNative; 15 import org.chromium.base.annotations.CalledByNative;
14 import org.chromium.chrome.browser.ChromeActivity; 16 import org.chromium.chrome.browser.ChromeActivity;
15 import org.chromium.chrome.browser.ChromeVersionInfo; 17 import org.chromium.chrome.browser.ChromeVersionInfo;
16 import org.chromium.chrome.browser.WebContentsFactory; 18 import org.chromium.chrome.browser.WebContentsFactory;
17 import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager; 19 import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 public void setViewPosition(View anchorView, float x, float y, float width, 289 public void setViewPosition(View anchorView, float x, float y, float width,
288 float height, float scale, int leftMargin, int topMa rgin) { } 290 float height, float scale, int leftMargin, int topMa rgin) { }
289 291
290 @Override 292 @Override
291 public void removeView(View anchorView) { } 293 public void removeView(View anchorView) { }
292 294
293 @Override 295 @Override
294 public ViewGroup getContainerView() { 296 public ViewGroup getContainerView() {
295 return mContainerView; 297 return mContainerView;
296 } 298 }
299
300 @Override
301 public void updatePointerIcon(PointerIcon icon) {
302 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
303 getContainerView().setPointerIcon(icon);
304 }
305 }
297 }.init(cv); 306 }.init(cv);
298 mContentViewCore.initialize(delegate, cv, panelWebContents, mActivity.ge tWindowAndroid()); 307 mContentViewCore.initialize(delegate, cv, panelWebContents, mActivity.ge tWindowAndroid());
299 308
300 // Transfers the ownership of the WebContents to the native OverlayPanel Content. 309 // Transfers the ownership of the WebContents to the native OverlayPanel Content.
301 nativeSetWebContents(mNativeOverlayPanelContentPtr, panelWebContents, mW ebContentsDelegate); 310 nativeSetWebContents(mNativeOverlayPanelContentPtr, panelWebContents, mW ebContentsDelegate);
302 311
303 mWebContentsObserver = 312 mWebContentsObserver =
304 new WebContentsObserver(panelWebContents) { 313 new WebContentsObserver(panelWebContents) {
305 @Override 314 @Override
306 public void didStartLoading(String url) { 315 public void didStartLoading(String url) {
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 private native void nativeRemoveLastHistoryEntry( 531 private native void nativeRemoveLastHistoryEntry(
523 long nativeOverlayPanelContent, String historyUrl, long urlTimeMs); 532 long nativeOverlayPanelContent, String historyUrl, long urlTimeMs);
524 private native void nativeOnPhysicalBackingSizeChanged( 533 private native void nativeOnPhysicalBackingSizeChanged(
525 long nativeOverlayPanelContent, WebContents webContents, int width, int height); 534 long nativeOverlayPanelContent, WebContents webContents, int width, int height);
526 private native void nativeSetWebContents(long nativeOverlayPanelContent, 535 private native void nativeSetWebContents(long nativeOverlayPanelContent,
527 WebContents webContents, WebContentsDelegateAndroid delegate); 536 WebContents webContents, WebContentsDelegateAndroid delegate);
528 private native void nativeDestroyWebContents(long nativeOverlayPanelContent) ; 537 private native void nativeDestroyWebContents(long nativeOverlayPanelContent) ;
529 private native void nativeSetInterceptNavigationDelegate(long nativeOverlayP anelContent, 538 private native void nativeSetInterceptNavigationDelegate(long nativeOverlayP anelContent,
530 InterceptNavigationDelegate delegate, WebContents webContents); 539 InterceptNavigationDelegate delegate, WebContents webContents);
531 } 540 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698