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

Unified Diff: chrome/browser/shell_dialogs.h

Issue 459008: Mac: the return of the tab-modal-sheets patch. (Closed)
Patch Set: Merged ToT. Must ... commit ... soon. Created 11 years 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 61a89fc1113d4646656573c6337986e90e8a518a..85210bee3f36013cd0578b05242e61e262e4f568 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.
@@ -116,6 +122,19 @@ class SelectFileDialog
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;
+
protected:
friend class base::RefCountedThreadSafe<SelectFileDialog>;
« 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