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

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

Issue 2834453007: Download Home : Remove drawer UI (Closed)
Patch Set: comments Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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.download; 5 package org.chromium.chrome.browser.download;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.view.View; 8 import android.view.View;
9 9
10 import org.chromium.base.ActivityState; 10 import org.chromium.base.ActivityState;
(...skipping 25 matching lines...) Expand all
36 super(activity, host); 36 super(activity, host);
37 } 37 }
38 38
39 @Override 39 @Override
40 protected void initialize(Activity activity, final NativePageHost host) { 40 protected void initialize(Activity activity, final NativePageHost host) {
41 ThreadUtils.assertOnUiThread(); 41 ThreadUtils.assertOnUiThread();
42 42
43 mManager = new DownloadManagerUi(activity, host.isIncognito(), activity. getComponentName(), 43 mManager = new DownloadManagerUi(activity, host.isIncognito(), activity. getComponentName(),
44 false, ((SnackbarManageable) activity).getSnackbarManager()); 44 false, ((SnackbarManageable) activity).getSnackbarManager());
45 mManager.setBasicNativePage(this); 45 mManager.setBasicNativePage(this);
46 mTitle = activity.getString(R.string.download_manager_ui_all_downloads); 46 mTitle = activity.getString(R.string.menu_downloads);
47 47
48 // #destroy() unregisters the ActivityStateListener to avoid checking fo r externally removed 48 // #destroy() unregisters the ActivityStateListener to avoid checking fo r externally removed
49 // downloads after the downloads page is closed. This requires each Down loadPage to have its 49 // downloads after the downloads page is closed. This requires each Down loadPage to have its
50 // own ActivityStateListener. If multiple tabs are showing the downloads page, multiple 50 // own ActivityStateListener. If multiple tabs are showing the downloads page, multiple
51 // requests to check for externally removed downloads will be issued whe n the activity is 51 // requests to check for externally removed downloads will be issued whe n the activity is
52 // resumed. 52 // resumed.
53 mActivityStateListener = new ActivityStateListener() { 53 mActivityStateListener = new ActivityStateListener() {
54 @Override 54 @Override
55 public void onActivityStateChange(Activity activity, int newState) { 55 public void onActivityStateChange(Activity activity, int newState) {
56 if (newState == ActivityState.RESUMED) { 56 if (newState == ActivityState.RESUMED) {
(...skipping 27 matching lines...) Expand all
84 } 84 }
85 85
86 @Override 86 @Override
87 public void destroy() { 87 public void destroy() {
88 mManager.onDestroyed(); 88 mManager.onDestroyed();
89 mManager = null; 89 mManager = null;
90 ApplicationStatus.unregisterActivityStateListener(mActivityStateListener ); 90 ApplicationStatus.unregisterActivityStateListener(mActivityStateListener );
91 super.destroy(); 91 super.destroy();
92 } 92 }
93 } 93 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698