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

Unified Diff: chrome/browser/shell_dialogs.h

Issue 164547: Mac: make save/open dialogs operate as tab-modal sheets.... Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Painfully (but hopefully correctly) merged ToT. Created 11 years, 2 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 | « chrome/browser/login_prompt_mac.mm ('k') | chrome/browser/tab_contents/constrained_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_dialogs.h
diff --git a/chrome/browser/shell_dialogs.h b/chrome/browser/shell_dialogs.h
index f9a3baae413c656ac0544b500d132a93561422cf..b89c1b0d65bb852ad2f4e145baaa0164b9026cc3 100644
--- a/chrome/browser/shell_dialogs.h
+++ b/chrome/browser/shell_dialogs.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -13,6 +13,8 @@
#include "base/ref_counted.h"
#include "base/string16.h"
+class TabContents;
+
namespace gfx {
class Font;
}
@@ -21,8 +23,12 @@ class Font;
class BaseShellDialog {
public:
// Returns true if a shell dialog box is currently being shown modally
- // to the specified owner.
+ // to the specified owner. (For tab-modals, one should provide a default
+ // implementations which just produces a window-modal; hence our default
+ // implementation just returns false.)
virtual bool IsRunning(gfx::NativeWindow owning_window) const = 0;
+ virtual bool IsRunningInTab(const TabContents* parent_tab) const
+ { return false; }
// Notifies the dialog box that the listener has been destroyed and it should
// no longer be sent notifications.
@@ -117,6 +123,19 @@ class SelectFileDialog
const FilePath::StringType& default_extension,
gfx::NativeWindow owning_window,
void* params) = 0;
+
+ // Same as SelectFile(), with nearly identical arguments, except that -- on
+ // platforms where this is supported -- it will display a tab-modal dialog box
+ // for the tab specified by |owning_tab| (if it is NULL, this will yield a
+ // modeless dialog). More than one instance can be shown per window.
+ virtual void SelectFileInTab(Type type,
+ const string16& title,
+ const FilePath& default_path,
+ const FileTypeInfo* file_types,
+ int file_type_index,
+ const FilePath::StringType& default_extension,
+ TabContents* owning_tab,
+ void* params) = 0;
};
// Shows a dialog box for selecting a font.
« no previous file with comments | « chrome/browser/login_prompt_mac.mm ('k') | chrome/browser/tab_contents/constrained_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698