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

Unified Diff: chrome/browser/ui/views/file_manager_dialog.h

Issue 8523006: Don't show FileManagerDialog if another FileManagerDialog is shown in the same tab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: a naming nit Created 9 years, 1 month 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/views/file_manager_dialog.h
diff --git a/chrome/browser/ui/views/file_manager_dialog.h b/chrome/browser/ui/views/file_manager_dialog.h
index e29afda6f5497ecd9be9f0663ec2269cd23b4f19..0feb5fda955330f19551a2fce1e10ccd667f5d9c 100644
--- a/chrome/browser/ui/views/file_manager_dialog.h
+++ b/chrome/browser/ui/views/file_manager_dialog.h
@@ -8,6 +8,7 @@
#include <map>
+#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
#include "chrome/browser/ui/shell_dialogs.h" // SelectFileDialog
#include "chrome/browser/ui/views/extensions/extension_dialog_observer.h"
@@ -56,6 +57,8 @@ class FileManagerDialog
private:
friend class FileManagerDialogBrowserTest;
friend class FileManagerDialogTest;
+ // This test creates an additional dialog, so we need to friend explicitly.
+ FRIEND_TEST_ALL_PREFIXES(FileManagerDialogBrowserTest, OpenTwoDialogs);
achuithb 2011/11/10 20:58:40 You could add a protected method like OpenSecondDi
tbarzic 2011/11/10 22:00:48 Done.
// Object is ref-counted, use FileManagerDialog::Create().
explicit FileManagerDialog(SelectFileDialog::Listener* listener);
@@ -70,6 +73,9 @@ class FileManagerDialog
// Adds this to the list of pending dialogs, used for testing.
void AddPending(int32 tab_id);
+ // Check if the list of pending dialogs contains dialog for |tab_id|.
+ bool PendingExists(int32 tab_id);
achuithb 2011/11/10 20:58:40 static?
James Cook 2011/11/10 21:04:54 Maybe call this IsPending()? const?
tbarzic 2011/11/10 22:00:48 Yep
tbarzic 2011/11/10 22:00:48 Hm, I don't feel IsPending would be the right name
+
// Returns if the dialog has mutiple file type choices
virtual bool HasMultipleFileTypeChoicesImpl();
« no previous file with comments | « no previous file | chrome/browser/ui/views/file_manager_dialog.cc » ('j') | chrome/browser/ui/views/file_manager_dialog.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698