| 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.toolbar; | 5 package org.chromium.chrome.browser.toolbar; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.content.res.Configuration; | 8 import android.content.res.Configuration; |
| 9 import android.graphics.drawable.Drawable; | 9 import android.graphics.drawable.Drawable; |
| 10 import android.os.Handler; | 10 import android.os.Handler; |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 if (DeviceFormFactor.isTablet(activity)) { | 451 if (DeviceFormFactor.isTablet(activity)) { |
| 452 if (visible) { | 452 if (visible) { |
| 453 mActionModeController.startShowAnimation(); | 453 mActionModeController.startShowAnimation(); |
| 454 } else { | 454 } else { |
| 455 mActionModeController.startHideAnimation(); | 455 mActionModeController.startHideAnimation(); |
| 456 } | 456 } |
| 457 } | 457 } |
| 458 } | 458 } |
| 459 | 459 |
| 460 @Override | 460 @Override |
| 461 public void onDidStartProvisionalLoadForFrame(Tab tab, long frameId,
long parentFrameId, | 461 public void onDidStartProvisionalLoadForFrame( |
| 462 boolean isMainFrame, String validatedUrl, boolean isErrorPag
e, | 462 Tab tab, boolean isMainFrame, String validatedUrl) { |
| 463 boolean isIframeSrcdoc) { | |
| 464 // This event is used as the primary trigger for the progress ba
r because it | 463 // This event is used as the primary trigger for the progress ba
r because it |
| 465 // is the earliest indication that a load has started for a part
icular frame. In | 464 // is the earliest indication that a load has started for a part
icular frame. In |
| 466 // the case of the progress bar, it should only traverse the scr
een a single time | 465 // the case of the progress bar, it should only traverse the scr
een a single time |
| 467 // per page load. So if this event states the main frame has sta
rted loading the | 466 // per page load. So if this event states the main frame has sta
rted loading the |
| 468 // progress bar is started. | 467 // progress bar is started. |
| 469 if (!isMainFrame) return; | 468 if (!isMainFrame) return; |
| 470 | 469 |
| 471 if (NativePageFactory.isNativePageUrl(validatedUrl, tab.isIncogn
ito())) { | 470 if (NativePageFactory.isNativePageUrl(validatedUrl, tab.isIncogn
ito())) { |
| 472 finishLoadProgress(false); | 471 finishLoadProgress(false); |
| 473 return; | 472 return; |
| (...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1238 } | 1237 } |
| 1239 | 1238 |
| 1240 /** | 1239 /** |
| 1241 * Cancels simulating load progress. | 1240 * Cancels simulating load progress. |
| 1242 */ | 1241 */ |
| 1243 public void cancel() { | 1242 public void cancel() { |
| 1244 mHandler.removeMessages(MSG_ID_UPDATE_PROGRESS); | 1243 mHandler.removeMessages(MSG_ID_UPDATE_PROGRESS); |
| 1245 } | 1244 } |
| 1246 } | 1245 } |
| 1247 } | 1246 } |
| OLD | NEW |