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.toolbar; | 5 package org.chromium.chrome.browser.toolbar; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.content.res.Configuration; | 8 import android.content.res.Configuration; |
9 import android.graphics.drawable.Drawable; | 9 import android.graphics.drawable.Drawable; |
10 import android.os.Handler; | 10 import android.os.Handler; |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 return; | 521 return; |
522 } | 522 } |
523 | 523 |
524 final FeatureEngagementTracker tracker = | 524 final FeatureEngagementTracker tracker = |
525 FeatureEngagementTrackerFactory.getFeatureEngagementTrac
kerForProfile( | 525 FeatureEngagementTrackerFactory.getFeatureEngagementTrac
kerForProfile( |
526 tab.getProfile()); | 526 tab.getProfile()); |
527 | 527 |
528 if (!tracker.shouldTriggerHelpUI(FeatureConstants.DOWNLOAD_PAGE_
FEATURE)) return; | 528 if (!tracker.shouldTriggerHelpUI(FeatureConstants.DOWNLOAD_PAGE_
FEATURE)) return; |
529 | 529 |
530 mTextBubble = new ViewAnchoredTextBubble(mToolbar.getContext(),
getMenuAnchor(), | 530 mTextBubble = new ViewAnchoredTextBubble(mToolbar.getContext(),
getMenuAnchor(), |
531 R.string.iph_download_page_for_offline_usage_text); | 531 R.string.iph_download_page_for_offline_usage_text, |
| 532 R.string.iph_download_page_for_offline_usage_accessibili
ty_text); |
532 mTextBubble.setDismissOnTouchInteraction(true); | 533 mTextBubble.setDismissOnTouchInteraction(true); |
533 mTextBubble.addOnDismissListener(new OnDismissListener() { | 534 mTextBubble.addOnDismissListener(new OnDismissListener() { |
534 @Override | 535 @Override |
535 public void onDismiss() { | 536 public void onDismiss() { |
536 mHandler.post(new Runnable() { | 537 mHandler.post(new Runnable() { |
537 @Override | 538 @Override |
538 public void run() { | 539 public void run() { |
539 tracker.dismissed(); | 540 tracker.dismissed(); |
540 activity.getAppMenuHandler().setMenuHighlight(nu
ll); | 541 activity.getAppMenuHandler().setMenuHighlight(nu
ll); |
541 } | 542 } |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 } | 1380 } |
1380 | 1381 |
1381 /** | 1382 /** |
1382 * Cancels simulating load progress. | 1383 * Cancels simulating load progress. |
1383 */ | 1384 */ |
1384 public void cancel() { | 1385 public void cancel() { |
1385 mHandler.removeMessages(MSG_ID_UPDATE_PROGRESS); | 1386 mHandler.removeMessages(MSG_ID_UPDATE_PROGRESS); |
1386 } | 1387 } |
1387 } | 1388 } |
1388 } | 1389 } |
OLD | NEW |