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

Side by Side Diff: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java

Issue 914083003: Hide Url bar in tab switcher mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review changes Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.shell; 5 package org.chromium.chrome.shell;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.res.Configuration; 9 import android.content.res.Configuration;
10 import android.util.AttributeSet; 10 import android.util.AttributeSet;
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 mAddButton = (ImageButton) findViewById(R.id.add_button); 251 mAddButton = (ImageButton) findViewById(R.id.add_button);
252 mAddButton.setOnClickListener(new OnClickListener() { 252 mAddButton.setOnClickListener(new OnClickListener() {
253 @Override 253 @Override
254 public void onClick(View v) { 254 public void onClick(View v) {
255 mTabManager.createNewTab(); 255 mTabManager.createNewTab();
256 } 256 }
257 }); 257 });
258 } 258 }
259 259
260 /** 260 /**
261 * Shows or hides the add and the stop/reload button. 261 * Shows or hides the add button, the stop/reload button and the Url bar.
Bernhard Bauer 2015/02/13 09:41:25 URL is spelled in all uppercase letters.
262 */ 262 */
263 public void updateToolBarButtonState() { 263 public void updateToolbarState() {
264 boolean tabSwitcherState = mTabManager.isTabSwitcherVisible(); 264 boolean tabSwitcherState = mTabManager.isTabSwitcherVisible();
265 mAddButton.setVisibility(tabSwitcherState ? VISIBLE : GONE); 265 mAddButton.setVisibility(tabSwitcherState ? VISIBLE : GONE);
266 mStopReloadButton.setVisibility(tabSwitcherState || mFocus ? GONE : VISI BLE); 266 mStopReloadButton.setVisibility(tabSwitcherState || mFocus ? GONE : VISI BLE);
267 mUrlTextView.setVisibility(tabSwitcherState ? INVISIBLE : VISIBLE);
267 } 268 }
268 269
269 /** 270 /**
270 * @return Current tab that is shown by ChromeShell. 271 * @return Current tab that is shown by ChromeShell.
271 */ 272 */
272 public ChromeShellTab getCurrentTab() { 273 public ChromeShellTab getCurrentTab() {
273 return mTab; 274 return mTab;
274 } 275 }
275 276
276 /** 277 /**
(...skipping 21 matching lines...) Expand all
298 public void onLoadProgressChanged(Tab tab, int progress) { 299 public void onLoadProgressChanged(Tab tab, int progress) {
299 if (tab == mTab) ChromeShellToolbar.this.onLoadProgressChanged(progr ess); 300 if (tab == mTab) ChromeShellToolbar.this.onLoadProgressChanged(progr ess);
300 } 301 }
301 302
302 @Override 303 @Override
303 public void onUpdateUrl(Tab tab, String url) { 304 public void onUpdateUrl(Tab tab, String url) {
304 if (tab == mTab) ChromeShellToolbar.this.onUpdateUrl(url); 305 if (tab == mTab) ChromeShellToolbar.this.onUpdateUrl(url);
305 } 306 }
306 } 307 }
307 } 308 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698