Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarModelImpl.java

Issue 2233023002: Adding BlimpNavigationController to Tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nav_handler_remove
Patch Set: @nyquist feedback Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.text.TextUtils; 8 import android.text.TextUtils;
9 9
10 import org.chromium.base.ApiCompatibilityUtils; 10 import org.chromium.base.ApiCompatibilityUtils;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 public NewTabPage getNewTabPageForCurrentTab() { 80 public NewTabPage getNewTabPageForCurrentTab() {
81 Tab currentTab = getTab(); 81 Tab currentTab = getTab();
82 if (currentTab != null && currentTab.getNativePage() instanceof NewTabPa ge) { 82 if (currentTab != null && currentTab.getNativePage() instanceof NewTabPa ge) {
83 return (NewTabPage) currentTab.getNativePage(); 83 return (NewTabPage) currentTab.getNativePage();
84 } 84 }
85 return null; 85 return null;
86 } 86 }
87 87
88 @Override 88 @Override
89 public String getText() { 89 public String getText() {
90 if (mTab != null && mTab.isBlimpTab()) return mTab.getUrl().trim();
David Trainor- moved to gerrit 2016/08/18 17:06:30 Are there any downsides to skipping the rest? Jus
shaktisahu 2016/08/18 19:36:06 Yes. This is right now same as blimp 0.5. The supe
91
90 String displayText = super.getText(); 92 String displayText = super.getText();
91 93
92 if (mTab == null || mTab.isFrozen()) return displayText; 94 if (mTab == null || mTab.isFrozen()) return displayText;
93 95
94 String url = mTab.getUrl().trim(); 96 String url = mTab.getUrl().trim();
95 if (DomDistillerUrlUtils.isDistilledPage(url)) { 97 if (DomDistillerUrlUtils.isDistilledPage(url)) {
96 if (isStoredArticle(url)) { 98 if (isStoredArticle(url)) {
97 DomDistillerService domDistillerService = 99 DomDistillerService domDistillerService =
98 DomDistillerServiceFactory.getForProfile(mTab.getProfile ()); 100 DomDistillerServiceFactory.getForProfile(mTab.getProfile ());
99 String originalUrl = domDistillerService.getUrlForEntry( 101 String originalUrl = domDistillerService.getUrlForEntry(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 @Override 145 @Override
144 public int getPrimaryColor() { 146 public int getPrimaryColor() {
145 return mPrimaryColor; 147 return mPrimaryColor;
146 } 148 }
147 149
148 @Override 150 @Override
149 public boolean isUsingBrandColor() { 151 public boolean isUsingBrandColor() {
150 return mIsUsingBrandColor; 152 return mIsUsingBrandColor;
151 } 153 }
152 } 154 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698