Index: chrome/browser/ui/cocoa/modal_dialog_client_cocoa.h |
diff --git a/chrome/browser/ui/cocoa/modal_dialog_client_cocoa.h b/chrome/browser/ui/cocoa/modal_dialog_client_cocoa.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8d8055b8b5cf66ce2ac85142938674edcaa9b0eb |
--- /dev/null |
+++ b/chrome/browser/ui/cocoa/modal_dialog_client_cocoa.h |
@@ -0,0 +1,44 @@ |
+// Copyright 2015 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_UI_COCOA_MODAL_DIALOG_CLIENT_COCOA_H_ |
+#define CHROME_BROWSER_UI_COCOA_MODAL_DIALOG_CLIENT_COCOA_H_ |
+ |
+#include "base/macros.h" |
+#include "base/memory/scoped_ptr.h" |
tapted
2015/03/02 04:28:50
nit: move to .mm?
Andre
2015/03/02 18:47:31
Done.
|
+ |
+class SingleWebContentsDialogManagerCocoa; |
+@protocol ConstrainedWindowSheet; |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+// A base class for showing a ConstrainedWindowSheet over a WebContents. |
+class ModalDialogClientCocoa { |
+ public: |
+ ModalDialogClientCocoa(); |
+ virtual ~ModalDialogClientCocoa(); |
+ |
+ SingleWebContentsDialogManagerCocoa* manager() const { return manager_; } |
+ void set_manager(SingleWebContentsDialogManagerCocoa* manager) { |
+ manager_ = manager; |
+ } |
+ |
+ // Shows |sheet| as a modal dialog over |contents|. |
+ void Show(id<ConstrainedWindowSheet> sheet, content::WebContents* contents); |
+ |
+ // Closes the sheet dialog. |
+ void Close(); |
+ |
+ // Called when the dialog is closing. |
+ virtual void OnDialogClosing() = 0; |
+ |
+ private: |
+ SingleWebContentsDialogManagerCocoa* manager_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ModalDialogClientCocoa); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_COCOA_MODAL_DIALOG_CLIENT_COCOA_H_ |