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

Unified Diff: chrome/browser/ui/cocoa/modal_dialog_client_cocoa.h

Issue 866263008: MacViews: Unify web contents modal dialog types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ValidationMessageBubble
Patch Set: Fixes for tapted Created 5 years, 10 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/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_

Powered by Google App Engine
This is Rietveld 408576698