OLD | NEW |
---|---|
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.tab; | 5 package org.chromium.chrome.browser.tab; |
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.content.Intent; | 9 import android.content.Intent; |
10 import android.content.res.Resources; | 10 import android.content.res.Resources; |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
424 isIncognito()); | 424 isIncognito()); |
425 | 425 |
426 LoadUrlParams loadUrlParams = new LoadUrlParams(url); | 426 LoadUrlParams loadUrlParams = new LoadUrlParams(url); |
427 loadUrlParams.setVerbatimHeaders(headers); | 427 loadUrlParams.setVerbatimHeaders(headers); |
428 loadUrlParams.setTransitionType(PageTransition.GENERATED); | 428 loadUrlParams.setTransitionType(PageTransition.GENERATED); |
429 getTabModelSelector().openNewTab(loadUrlParams, | 429 getTabModelSelector().openNewTab(loadUrlParams, |
430 TabLaunchType.FROM_LONGPRESS_FOREGROUND, Tab.this, isIncogni to()); | 430 TabLaunchType.FROM_LONGPRESS_FOREGROUND, Tab.this, isIncogni to()); |
431 } | 431 } |
432 | 432 |
433 @Override | 433 @Override |
434 public int getSystemWindowInsetLeft() { | |
Ted C
2016/03/12 00:01:44
instead of having 4 methods, I wonder if we should
| |
435 ChromeActivity activity = getActivity(); | |
436 if (activity != null && activity.getInsetConsumerView() != null) { | |
Ted C
2016/03/12 00:01:44
As far as I can tell from your patch, the inset co
| |
437 return activity.getInsetConsumerView().getSystemWindowInsetsLeft (); | |
438 } | |
439 return 0; | |
440 } | |
441 | |
442 @Override | |
443 public int getSystemWindowInsetTop() { | |
444 ChromeActivity activity = getActivity(); | |
445 if (activity != null && activity.getInsetConsumerView() != null) { | |
446 return activity.getInsetConsumerView().getSystemWindowInsetsTop( ); | |
447 } | |
448 return 0; | |
449 } | |
450 | |
451 @Override | |
452 public int getSystemWindowInsetRight() { | |
453 ChromeActivity activity = getActivity(); | |
454 if (activity != null && activity.getInsetConsumerView() != null) { | |
455 return activity.getInsetConsumerView().getSystemWindowInsetsRigh t(); | |
456 } | |
457 return 0; | |
458 } | |
459 | |
460 @Override | |
461 public int getSystemWindowInsetBottom() { | |
462 ChromeActivity activity = getActivity(); | |
463 if (activity != null && activity.getInsetConsumerView() != null) { | |
464 return activity.getInsetConsumerView().getSystemWindowInsetsBott om(); | |
465 } | |
466 return 0; | |
467 } | |
468 | |
469 @Override | |
434 public ContentVideoViewEmbedder getContentVideoViewEmbedder() { | 470 public ContentVideoViewEmbedder getContentVideoViewEmbedder() { |
435 return new ActivityContentVideoViewEmbedder(getActivity()) { | 471 return new ActivityContentVideoViewEmbedder(getActivity()) { |
436 @Override | 472 @Override |
437 public void enterFullscreenVideo(View view) { | 473 public void enterFullscreenVideo(View view) { |
438 super.enterFullscreenVideo(view); | 474 super.enterFullscreenVideo(view); |
439 FullscreenManager fullscreenManager = getFullscreenManager() ; | 475 FullscreenManager fullscreenManager = getFullscreenManager() ; |
440 if (fullscreenManager != null) { | 476 if (fullscreenManager != null) { |
441 fullscreenManager.setOverlayVideoMode(true); | 477 fullscreenManager.setOverlayVideoMode(true); |
442 // Disable double tap for video. | 478 // Disable double tap for video. |
443 if (getContentViewCore() != null) { | 479 if (getContentViewCore() != null) { |
(...skipping 2576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3020 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro id, | 3056 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro id, |
3021 InterceptNavigationDelegate delegate); | 3057 InterceptNavigationDelegate delegate); |
3022 private native void nativeAttachToTabContentManager(long nativeTabAndroid, | 3058 private native void nativeAttachToTabContentManager(long nativeTabAndroid, |
3023 TabContentManager tabContentManager); | 3059 TabContentManager tabContentManager); |
3024 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid , | 3060 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid , |
3025 ContentViewCore content, boolean visible); | 3061 ContentViewCore content, boolean visible); |
3026 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid , | 3062 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid , |
3027 ContentViewCore content); | 3063 ContentViewCore content); |
3028 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String url); | 3064 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String url); |
3029 } | 3065 } |
OLD | NEW |