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() { |
| 435 ChromeActivity activity = getActivity(); |
| 436 if (activity != null) { |
| 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) { |
| 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) { |
| 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) { |
| 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 2577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3021 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, | 3057 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro
id, |
3022 InterceptNavigationDelegate delegate); | 3058 InterceptNavigationDelegate delegate); |
3023 private native void nativeAttachToTabContentManager(long nativeTabAndroid, | 3059 private native void nativeAttachToTabContentManager(long nativeTabAndroid, |
3024 TabContentManager tabContentManager); | 3060 TabContentManager tabContentManager); |
3025 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid
, | 3061 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid
, |
3026 ContentViewCore content, boolean visible); | 3062 ContentViewCore content, boolean visible); |
3027 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid
, | 3063 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid
, |
3028 ContentViewCore content); | 3064 ContentViewCore content); |
3029 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); | 3065 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String
url); |
3030 } | 3066 } |
OLD | NEW |