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

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

Issue 2623993007: 🏠 Extract the ContentSuggestionManager interface from NTP (Closed)
Patch Set: aaaand rebase again Created 3 years, 11 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; 5 package org.chromium.chrome.browser;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.Activity; 9 import android.app.Activity;
10 import android.app.ActivityManager; 10 import android.app.ActivityManager;
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_DOWNLOADS _MANAGER); 1243 NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_DOWNLOADS _MANAGER);
1244 } 1244 }
1245 RecordUserAction.record("MobileMenuDownloadManager"); 1245 RecordUserAction.record("MobileMenuDownloadManager");
1246 } else if (id == R.id.open_recently_closed_tab) { 1246 } else if (id == R.id.open_recently_closed_tab) {
1247 TabModel currentModel = mTabModelSelectorImpl.getCurrentModel(); 1247 TabModel currentModel = mTabModelSelectorImpl.getCurrentModel();
1248 if (!currentModel.isIncognito()) currentModel.openMostRecentlyClosed Tab(); 1248 if (!currentModel.isIncognito()) currentModel.openMostRecentlyClosed Tab();
1249 RecordUserAction.record("MobileTabClosedUndoShortCut"); 1249 RecordUserAction.record("MobileTabClosedUndoShortCut");
1250 } else if (id == R.id.enter_vr_id) { 1250 } else if (id == R.id.enter_vr_id) {
1251 mVrShellDelegate.enterVRIfNecessary(); 1251 mVrShellDelegate.enterVRIfNecessary();
1252 } else if (id == R.id.content_suggestions_standalone_ui) { 1252 } else if (id == R.id.content_suggestions_standalone_ui) {
1253 ContentSuggestionsActivity.launch(getApplicationContext()); 1253 ContentSuggestionsActivity.launch(this);
1254 } else { 1254 } else {
1255 return super.onMenuOrKeyboardAction(id, fromMenu); 1255 return super.onMenuOrKeyboardAction(id, fromMenu);
1256 } 1256 }
1257 return true; 1257 return true;
1258 } 1258 }
1259 1259
1260 private void recordBackPressedUma(String logMessage, @BackPressedResult int action) { 1260 private void recordBackPressedUma(String logMessage, @BackPressedResult int action) {
1261 Log.i(TAG, "Back pressed: " + logMessage); 1261 Log.i(TAG, "Back pressed: " + logMessage);
1262 RecordHistogram.recordEnumeratedHistogram( 1262 RecordHistogram.recordEnumeratedHistogram(
1263 "Android.Activity.ChromeTabbedActivity.SystemBackAction", 1263 "Android.Activity.ChromeTabbedActivity.SystemBackAction",
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 1758
1759 ActivityManager manager = (ActivityManager) getSystemService(Context.ACT IVITY_SERVICE); 1759 ActivityManager manager = (ActivityManager) getSystemService(Context.ACT IVITY_SERVICE);
1760 for (AppTask task : manager.getAppTasks()) { 1760 for (AppTask task : manager.getAppTasks()) {
1761 RecentTaskInfo info = DocumentUtils.getTaskInfoFromTask(task); 1761 RecentTaskInfo info = DocumentUtils.getTaskInfoFromTask(task);
1762 if (info == null) continue; 1762 if (info == null) continue;
1763 if (info.id == sMergedInstanceTaskId) return true; 1763 if (info.id == sMergedInstanceTaskId) return true;
1764 } 1764 }
1765 return false; 1765 return false;
1766 } 1766 }
1767 } 1767 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698