| 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.omnibox; | 5 package org.chromium.chrome.browser.omnibox; |
| 6 | 6 |
| 7 import static org.chromium.chrome.browser.toolbar.ToolbarPhone.URL_FOCUS_CHANGE_
ANIMATION_DURATION_MS; | 7 import static org.chromium.chrome.browser.toolbar.ToolbarPhone.URL_FOCUS_CHANGE_
ANIMATION_DURATION_MS; |
| 8 | 8 |
| 9 import android.Manifest; | 9 import android.Manifest; |
| 10 import android.animation.Animator; | 10 import android.animation.Animator; |
| (...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 /** | 1216 /** |
| 1217 * Determines the icon that should be displayed for the current security lev
el. | 1217 * Determines the icon that should be displayed for the current security lev
el. |
| 1218 * @param securityLevel The security level for which the resource will be re
turned. | 1218 * @param securityLevel The security level for which the resource will be re
turned. |
| 1219 * @param isSmallDevice Whether the device form factor is small (like a phon
e) or large | 1219 * @param isSmallDevice Whether the device form factor is small (like a phon
e) or large |
| 1220 * (like a tablet). | 1220 * (like a tablet). |
| 1221 * @return The resource ID of the icon that should be displayed, 0 if no ico
n should show. | 1221 * @return The resource ID of the icon that should be displayed, 0 if no ico
n should show. |
| 1222 */ | 1222 */ |
| 1223 public static int getSecurityIconResource(int securityLevel, boolean isSmall
Device) { | 1223 public static int getSecurityIconResource(int securityLevel, boolean isSmall
Device) { |
| 1224 switch (securityLevel) { | 1224 switch (securityLevel) { |
| 1225 case ConnectionSecurityLevel.NONE: | 1225 case ConnectionSecurityLevel.NONE: |
| 1226 case ConnectionSecurityLevel.HTTP_WARNING: |
| 1226 return isSmallDevice ? 0 : R.drawable.omnibox_info; | 1227 return isSmallDevice ? 0 : R.drawable.omnibox_info; |
| 1227 case ConnectionSecurityLevel.SECURITY_WARNING: | 1228 case ConnectionSecurityLevel.SECURITY_WARNING: |
| 1228 return R.drawable.omnibox_info; | 1229 return R.drawable.omnibox_info; |
| 1229 case ConnectionSecurityLevel.SECURITY_ERROR: | 1230 case ConnectionSecurityLevel.SECURITY_ERROR: |
| 1230 return R.drawable.omnibox_https_invalid; | 1231 return R.drawable.omnibox_https_invalid; |
| 1231 case ConnectionSecurityLevel.SECURE: | 1232 case ConnectionSecurityLevel.SECURE: |
| 1232 case ConnectionSecurityLevel.EV_SECURE: | 1233 case ConnectionSecurityLevel.EV_SECURE: |
| 1233 return R.drawable.omnibox_https_valid; | 1234 return R.drawable.omnibox_https_valid; |
| 1234 default: | 1235 default: |
| 1235 assert false; | 1236 assert false; |
| (...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2459 public View getContainerView() { | 2460 public View getContainerView() { |
| 2460 return this; | 2461 return this; |
| 2461 } | 2462 } |
| 2462 | 2463 |
| 2463 @Override | 2464 @Override |
| 2464 public void setTitleToPageTitle() { } | 2465 public void setTitleToPageTitle() { } |
| 2465 | 2466 |
| 2466 @Override | 2467 @Override |
| 2467 public void setShowTitle(boolean showTitle) { } | 2468 public void setShowTitle(boolean showTitle) { } |
| 2468 } | 2469 } |
| OLD | NEW |