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

Unified Diff: chrome/browser/cocoa/download_request_dialog_delegate_mac.h

Issue 159780: Add support for constrained windows on os x, based on Avi's GTMWindowSheetController. (Closed)
Patch Set: Merge with ToT Created 11 years, 4 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
Index: chrome/browser/cocoa/download_request_dialog_delegate_mac.h
diff --git a/chrome/browser/cocoa/download_request_dialog_delegate_mac.h b/chrome/browser/cocoa/download_request_dialog_delegate_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..f12ae19b8f77a967a26e0a92212a829062fc9949
--- /dev/null
+++ b/chrome/browser/cocoa/download_request_dialog_delegate_mac.h
@@ -0,0 +1,43 @@
+// Copyright (c) 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.
+
+#ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_DIALOG_DELEGATE_MAC_H_
+#define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_DIALOG_DELEGATE_MAC_H_
+
+#include "base/scoped_nsobject.h"
+#include "base/scoped_ptr.h"
+#include "chrome/browser/cocoa/constrained_window_mac.h"
+#include "chrome/browser/download/download_request_dialog_delegate.h"
+#include "chrome/browser/download/download_request_manager.h"
+
+@class SheetCallback;
+class TabContents;
+
+class DownloadRequestDialogDelegateMac : public DownloadRequestDialogDelegate,
+ public ConstrainedWindowMacDelegateSystemSheet {
+ public:
+ DownloadRequestDialogDelegateMac(TabContents* tab,
+ DownloadRequestManager::TabDownloadState* host);
+
+ // Implement ConstrainedWindowMacDelegateSystemSheet.
+ virtual void DeleteDelegate();
+
+ // Called when the sheet is done.
+ void SheetDidEnd(int returnCode);
+
+ private:
+ // DownloadRequestDialogDelegate methods.
+ virtual void CloseWindow();
+
+ // The ConstrainedWindow that is hosting our DownloadRequestDialog.
+ ConstrainedWindow* window_;
+
+ // Has a button on the sheet been clicked?
+ bool responded_;
+
+ DISALLOW_COPY_AND_ASSIGN(DownloadRequestDialogDelegateMac);
+};
+
+#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_DIALOG_DELEGATE_MAC_H_
+

Powered by Google App Engine
This is Rietveld 408576698