Index: chrome/browser/ui/webui/active_downloads_ui.cc |
=================================================================== |
--- chrome/browser/ui/webui/active_downloads_ui.cc (revision 85168) |
+++ chrome/browser/ui/webui/active_downloads_ui.cc (working copy) |
@@ -21,6 +21,7 @@ |
#include "base/time.h" |
#include "base/utf_string_conversions.h" |
#include "base/values.h" |
+#include "chrome/app/chrome_command_ids.h" |
#include "chrome/browser/chromeos/cros/cros_library.h" |
#include "chrome/browser/chromeos/login/user_manager.h" |
#include "chrome/browser/download/download_item.h" |
@@ -403,16 +404,18 @@ |
params.disposition = NEW_FOREGROUND_TAB; |
browser::Navigate(¶ms); |
+ DCHECK_EQ(browser, params.browser); |
// TODO(beng): The following two calls should be automatic by Navigate(). |
- params.browser->window()->SetBounds(gfx::Rect(kPopupLeft, |
+ browser->window()->SetBounds(gfx::Rect(kPopupLeft, |
kPopupTop, |
kPopupWidth, |
kPopupHeight)); |
xiyuan
2011/05/13 16:34:28
nit: align the args.
|
- params.browser->window()->Show(); |
- } else { |
- browser->window()->Show(); |
+ |
+ // Disallow Open File. |
+ browser->command_updater()->UpdateCommandEnabled(IDC_OPEN_FILE, false); |
xiyuan
2011/05/13 16:34:28
This is not a reliable way to disable a command. S
|
} |
+ browser->window()->Show(); |
return browser; |
} |