| 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 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1962 if (!TextUtils.isEmpty(displayText) && mToolbarDataProvider.wouldReplace
URL()) { | 1962 if (!TextUtils.isEmpty(displayText) && mToolbarDataProvider.wouldReplace
URL()) { |
| 1963 if (getSecurityLevel() == ConnectionSecurityLevel.SECURITY_ERROR) { | 1963 if (getSecurityLevel() == ConnectionSecurityLevel.SECURITY_ERROR) { |
| 1964 assert false : "Search terms should not be shown for https error
pages."; | 1964 assert false : "Search terms should not be shown for https error
pages."; |
| 1965 displayText = url; | 1965 displayText = url; |
| 1966 } else { | 1966 } else { |
| 1967 url = displayText.trim(); | 1967 url = displayText.trim(); |
| 1968 showingQuery = true; | 1968 showingQuery = true; |
| 1969 mQueryInTheOmnibox = true; | 1969 mQueryInTheOmnibox = true; |
| 1970 } | 1970 } |
| 1971 } | 1971 } |
| 1972 String path = null; | |
| 1973 if (!showingQuery) { | |
| 1974 Pair<String, String> urlText = splitPathFromUrlDisplayText(displayTe
xt); | |
| 1975 displayText = urlText.first; | |
| 1976 path = urlText.second; | |
| 1977 } | |
| 1978 | 1972 |
| 1979 if (setUrlBarText(displayText, path, url)) { | 1973 if (setUrlBarText(displayText, null, url)) { |
| 1980 mUrlBar.deEmphasizeUrl(); | 1974 mUrlBar.deEmphasizeUrl(); |
| 1981 emphasizeUrl(); | 1975 emphasizeUrl(); |
| 1982 } | 1976 } |
| 1983 if (showingQuery) { | 1977 if (showingQuery) { |
| 1984 updateNavigationButton(); | 1978 updateNavigationButton(); |
| 1985 } | 1979 } |
| 1986 updateCustomSelectionActionModeCallback(); | 1980 updateCustomSelectionActionModeCallback(); |
| 1987 } | 1981 } |
| 1988 | 1982 |
| 1989 /** | 1983 /** |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2391 public View getContainerView() { | 2385 public View getContainerView() { |
| 2392 return this; | 2386 return this; |
| 2393 } | 2387 } |
| 2394 | 2388 |
| 2395 @Override | 2389 @Override |
| 2396 public void setTitleToPageTitle() { } | 2390 public void setTitleToPageTitle() { } |
| 2397 | 2391 |
| 2398 @Override | 2392 @Override |
| 2399 public void setShowTitle(boolean showTitle) { } | 2393 public void setShowTitle(boolean showTitle) { } |
| 2400 } | 2394 } |
| OLD | NEW |