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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/widget/accessibility/AccessibilityTabModelWrapper.java

Issue 761723002: AccessibilityTabModelWrapper should call notifyDataSetChanged() when newTab is created (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTabModelSelector.java » ('j') | 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.browser.widget.accessibility; 5 package org.chromium.chrome.browser.widget.accessibility;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.util.AttributeSet; 8 import android.util.AttributeSet;
9 import android.view.View; 9 import android.view.View;
10 import android.widget.ImageButton; 10 import android.widget.ImageButton;
(...skipping 21 matching lines...) Expand all
32 private TabModelSelector.ChangeListener mTabModelChangeListener = 32 private TabModelSelector.ChangeListener mTabModelChangeListener =
33 new TabModelSelector.ChangeListener() { 33 new TabModelSelector.ChangeListener() {
34 34
35 @Override 35 @Override
36 public void onChange() { 36 public void onChange() {
37 getAdapter().notifyDataSetChanged(); 37 getAdapter().notifyDataSetChanged();
38 } 38 }
39 39
40 @Override 40 @Override
41 public void onNewTabCreated(Tab tab) { 41 public void onNewTabCreated(Tab tab) {
42 getAdapter().notifyDataSetChanged();
42 } 43 }
43 }; 44 };
44 45
45 // TODO(bauerb): Use View#isAttachedToWindow() as soon as we are guaranteed 46 // TODO(bauerb): Use View#isAttachedToWindow() as soon as we are guaranteed
46 // to run against API version 19. 47 // to run against API version 19.
47 private boolean mIsAttachedToWindow; 48 private boolean mIsAttachedToWindow;
48 49
49 private class ButtonOnClickListener implements View.OnClickListener { 50 private class ButtonOnClickListener implements View.OnClickListener {
50 private final boolean mIncognito; 51 private final boolean mIncognito;
51 52
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 153
153 @Override 154 @Override
154 protected void onAttachedToWindow() { 155 protected void onAttachedToWindow() {
155 mTabModelSelector.registerChangeListener(mTabModelChangeListener); 156 mTabModelSelector.registerChangeListener(mTabModelChangeListener);
156 mIsAttachedToWindow = true; 157 mIsAttachedToWindow = true;
157 super.onAttachedToWindow(); 158 super.onAttachedToWindow();
158 } 159 }
159 160
160 @Override 161 @Override
161 protected void onDetachedFromWindow() { 162 protected void onDetachedFromWindow() {
162 mTabModelSelector.unregisterChangeListener(mTabModelChangeListener);
163 mIsAttachedToWindow = false; 163 mIsAttachedToWindow = false;
164 super.onDetachedFromWindow(); 164 super.onDetachedFromWindow();
165 } 165 }
166 } 166 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTabModelSelector.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698