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

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

Issue 6969057: Support for re-using open tabs (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(&params);
+ 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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698