| OLD | NEW |
| 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 org.chromium.base.VisibleForTesting; | 7 import org.chromium.base.VisibleForTesting; |
| 8 import org.chromium.base.annotations.CalledByNative; | 8 import org.chromium.base.annotations.CalledByNative; |
| 9 import org.chromium.chrome.browser.ChromeActivity; | 9 import org.chromium.chrome.browser.ChromeActivity; |
| 10 import org.chromium.chrome.browser.WebContentsFactory; | 10 import org.chromium.chrome.browser.WebContentsFactory; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 */ | 125 */ |
| 126 public OverlayPanelContent(OverlayContentDelegate contentDelegate, | 126 public OverlayPanelContent(OverlayContentDelegate contentDelegate, |
| 127 OverlayContentProgressObserver progressObserver, ChromeActivity acti
vity) { | 127 OverlayContentProgressObserver progressObserver, ChromeActivity acti
vity) { |
| 128 mNativeOverlayPanelContentPtr = nativeInit(); | 128 mNativeOverlayPanelContentPtr = nativeInit(); |
| 129 mContentDelegate = contentDelegate; | 129 mContentDelegate = contentDelegate; |
| 130 mProgressObserver = progressObserver; | 130 mProgressObserver = progressObserver; |
| 131 mActivity = activity; | 131 mActivity = activity; |
| 132 | 132 |
| 133 mWebContentsDelegate = new WebContentsDelegateAndroid() { | 133 mWebContentsDelegate = new WebContentsDelegateAndroid() { |
| 134 @Override | 134 @Override |
| 135 public void onLoadStarted() { | 135 public void onLoadStarted(boolean toDifferentDocument) { |
| 136 super.onLoadStarted(); | 136 super.onLoadStarted(toDifferentDocument); |
| 137 mProgressObserver.onProgressBarStarted(); | 137 mProgressObserver.onProgressBarStarted(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 @Override | 140 @Override |
| 141 public void onLoadStopped() { | 141 public void onLoadStopped() { |
| 142 super.onLoadStopped(); | 142 super.onLoadStopped(); |
| 143 mProgressObserver.onProgressBarFinished(); | 143 mProgressObserver.onProgressBarFinished(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 @Override | 146 @Override |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 private native long nativeInit(); | 425 private native long nativeInit(); |
| 426 private native void nativeDestroy(long nativeOverlayPanelContent); | 426 private native void nativeDestroy(long nativeOverlayPanelContent); |
| 427 private native void nativeRemoveLastHistoryEntry( | 427 private native void nativeRemoveLastHistoryEntry( |
| 428 long nativeOverlayPanelContent, String historyUrl, long urlTimeMs); | 428 long nativeOverlayPanelContent, String historyUrl, long urlTimeMs); |
| 429 private native void nativeSetWebContents(long nativeOverlayPanelContent, | 429 private native void nativeSetWebContents(long nativeOverlayPanelContent, |
| 430 ContentViewCore contentViewCore, WebContentsDelegateAndroid delegate
); | 430 ContentViewCore contentViewCore, WebContentsDelegateAndroid delegate
); |
| 431 private native void nativeDestroyWebContents(long nativeOverlayPanelContent)
; | 431 private native void nativeDestroyWebContents(long nativeOverlayPanelContent)
; |
| 432 private native void nativeSetInterceptNavigationDelegate(long nativeOverlayP
anelContent, | 432 private native void nativeSetInterceptNavigationDelegate(long nativeOverlayP
anelContent, |
| 433 InterceptNavigationDelegate delegate, WebContents webContents); | 433 InterceptNavigationDelegate delegate, WebContents webContents); |
| 434 } | 434 } |
| OLD | NEW |