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

Unified Diff: chrome/browser/ui/browser.cc

Issue 10073017: Remove Active Downloads UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index e9441f2f775f9cd9dccfa5be56e0641f7ccbffc4..8594b9a68290f4722ee75e64220ad6b1cd3e2ae0 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -45,6 +45,7 @@
#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/download/download_service.h"
#include "chrome/browser/download/download_service_factory.h"
+#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/download/download_started_animation.h"
#include "chrome/browser/download/download_util.h"
#include "chrome/browser/extensions/browser_extension_window_controller.h"
@@ -205,12 +206,9 @@
#include "chrome/browser/chromeos/boot_times_loader.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
#include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
+#include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/power_manager_client.h"
-#if defined(USE_AURA)
-#include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h"
-#endif
-#include "chrome/browser/ui/webui/chromeos/active_downloads_ui.h"
#endif
#if defined(USE_ASH)
@@ -219,10 +217,6 @@
#include "chrome/browser/ui/views/ash/panel_view_aura.h"
#endif
-#if !defined(OS_CHROMEOS) || defined(USE_AURA)
-#include "chrome/browser/download/download_shelf.h"
-#endif
-
#if defined(FILE_MANAGER_EXTENSION)
#include "chrome/browser/chromeos/extensions/file_manager_util.h"
#endif
@@ -319,12 +313,10 @@ bool ParseCommaSeparatedIntegers(const std::string& str,
}
bool AllowPanels(const std::string& app_name) {
-#if (!defined(OS_CHROMEOS) || defined(USE_AURA))
if (!PanelManager::ShouldUsePanels(
web_app::GetExtensionIdFromApplicationName(app_name))) {
return false;
}
-#endif // !OS_CHROMEOS || USE_AURA
return true;
}
@@ -1645,13 +1637,7 @@ bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
window_->IsFullscreen();
#endif
- unsigned int features = FEATURE_INFOBAR;
-
-#if !defined(OS_CHROMEOS) || defined(USE_AURA)
- // Chrome OS opens a FileBrowse pop up instead of using download shelf.
- // So FEATURE_DOWNLOADSHELF is only added for non-chromeos platforms.
- features |= FEATURE_DOWNLOADSHELF;
-#endif // !defined(OS_CHROMEOS) || defined(USE_AURA)
+ unsigned int features = (FEATURE_INFOBAR | FEATURE_DOWNLOADSHELF);
if (is_type_tabbed())
features |= FEATURE_BOOKMARKBAR;
@@ -2396,14 +2382,11 @@ void Browser::ShowHistoryTab() {
void Browser::ShowDownloadsTab() {
content::RecordAction(UserMetricsAction("ShowDownloads"));
-#if !defined(OS_CHROMEOS) || defined(USE_AURA)
- // ChromiumOS (non-Aura) uses ActiveDownloadsUI instead of of DownloadShelf.
if (window()) {
DownloadShelf* shelf = window()->GetDownloadShelf();
if (shelf->IsShowing())
shelf->Close();
}
-#endif
ShowSingletonTabOverwritingNTP(
GetSingletonTabNavigateParams(GURL(chrome::kChromeUIDownloadsURL)));
}
@@ -2581,7 +2564,7 @@ void Browser::OpenAddBluetoothDeviceDialog() {
}
#endif // defined(OS_CHROMEOS)
-#if defined(OS_CHROMEOS) && defined(USE_AURA)
+#if defined(OS_CHROMEOS)
void Browser::OpenCrosh() {
GURL crosh_url = TerminalExtensionHelper::GetCroshExtensionURL(profile_);
if (!crosh_url.is_valid())
@@ -3253,7 +3236,7 @@ void Browser::ExecuteCommandWithDisposition(
case IDC_INTERNET_OPTIONS: OpenInternetOptionsDialog(); break;
case IDC_LANGUAGE_OPTIONS: OpenLanguageOptionsDialog(); break;
#endif
-#if defined(OS_CHROMEOS) && defined(USE_AURA)
+#if defined(OS_CHROMEOS)
case IDC_NEW_CROSH_TAB: OpenCrosh(); break;
#endif
case IDC_SHOW_SYNC_SETUP: ShowSyncSetup(SyncPromoUI::SOURCE_MENU);
@@ -3992,10 +3975,6 @@ void Browser::OnStartDownload(WebContents* source,
return;
if (DisplayOldDownloadsUI()) {
-#if defined(OS_CHROMEOS) && !defined(USE_AURA)
- if (ActiveDownloadsUI::ShouldShowPopup(profile_, download))
- ActiveDownloadsUI::OpenPopup(profile_);
-#else
// GetDownloadShelf creates the download shelf if it was not yet created.
DownloadShelf* shelf = window()->GetDownloadShelf();
shelf->AddDownload(new DownloadItemModel(download));
@@ -4013,7 +3992,6 @@ void Browser::OnStartDownload(WebContents* source,
ui::Animation::ShouldRenderRichAnimation()) {
DownloadStartedAnimation::Show(shelf_tab);
}
-#endif
}
// If the download occurs in a new tab, close it.
@@ -4688,7 +4666,7 @@ void Browser::InitCommandState() {
// Window management commands
command_updater_.UpdateCommandEnabled(IDC_CLOSE_WINDOW, true);
command_updater_.UpdateCommandEnabled(IDC_NEW_TAB, true);
-#if defined(OS_CHROMEOS) && defined(USE_AURA)
+#if defined(OS_CHROMEOS)
command_updater_.UpdateCommandEnabled(IDC_NEW_CROSH_TAB, true);
#endif
command_updater_.UpdateCommandEnabled(IDC_CLOSE_TAB, true);

Powered by Google App Engine
This is Rietveld 408576698