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

Unified Diff: components/constrained_window/native_web_contents_modal_dialog_manager_views_mac.h

Issue 1779383002: MacViews: Remove constrained window dependencies for certificate viewer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert random change that was made accidentally? Created 4 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: components/constrained_window/native_web_contents_modal_dialog_manager_views_mac.h
diff --git a/components/constrained_window/native_web_contents_modal_dialog_manager_views_mac.h b/components/constrained_window/native_web_contents_modal_dialog_manager_views_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..eda21318ab8e9f55e11bab5fa93b86bee03599e7
--- /dev/null
+++ b/components/constrained_window/native_web_contents_modal_dialog_manager_views_mac.h
@@ -0,0 +1,37 @@
+// Copyright 2016 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.
+
+#include "components/constrained_window/native_web_contents_modal_dialog_manager_views.h"
+
+namespace web_modal {
+class SingleWebContentsDialogManagerDelegate;
+}
+
+namespace constrained_window {
+
+// Class for parenting a Mac Cocoa sheet on a views tab modal dialog off of a
+// views browser, e.g. for tab-modal Cocoa sheets. Since Cocoa sheets are modal
+// to the parent window, the sheet is instead parented to an invisible views
+// overlay window which is tab-modal.
+class NativeWebContentsModalDialogManagerViewsMac
+ : public NativeWebContentsModalDialogManagerViews {
+ public:
+ NativeWebContentsModalDialogManagerViewsMac(
+ gfx::NativeWindow dialog,
+ web_modal::SingleWebContentsDialogManagerDelegate* native_delegate)
+ : NativeWebContentsModalDialogManagerViews(dialog, native_delegate) {}
msw 2016/08/22 23:01:19 nit: this should be defined in the .mm file, right
Patti Lor 2016/08/25 08:25:12 Done.
+
+ // NativeWebContentsModalDialogManagerViews:
+ void OnPositionRequiresUpdate() override;
+ void ShowWidget(views::Widget* widget) override;
+ void HideWidget(views::Widget* widget) override;
+
+ private:
+ // Sets visibility and mouse events for the overlay and its sheet.
+ void SetSheetVisible(gfx::NativeWindow overlay, bool visible);
+
+ DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManagerViewsMac);
+};
+
+} // namespace constrained_window

Powered by Google App Engine
This is Rietveld 408576698