OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "components/constrained_window/native_web_contents_modal_dialog_manager _views.h" | |
6 | |
7 namespace web_modal { | |
8 class SingleWebContentsDialogManagerDelegate; | |
9 } | |
10 | |
11 namespace constrained_window { | |
12 | |
13 // Class for parenting a Mac Cocoa sheet on a views tab modal dialog off of a | |
14 // views browser, e.g. for tab-modal Cocoa sheets. Since Cocoa sheets are modal | |
15 // to the parent window, the sheet is instead parented to an invisible views | |
16 // overlay window which is tab-modal. | |
17 class NativeWebContentsModalDialogManagerViewsMac | |
18 : public NativeWebContentsModalDialogManagerViews { | |
19 public: | |
20 NativeWebContentsModalDialogManagerViewsMac( | |
21 gfx::NativeWindow dialog, | |
22 web_modal::SingleWebContentsDialogManagerDelegate* native_delegate) | |
23 : 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.
| |
24 | |
25 // NativeWebContentsModalDialogManagerViews: | |
26 void OnPositionRequiresUpdate() override; | |
27 void ShowWidget(views::Widget* widget) override; | |
28 void HideWidget(views::Widget* widget) override; | |
29 | |
30 private: | |
31 // Sets visibility and mouse events for the overlay and its sheet. | |
32 void SetSheetVisible(gfx::NativeWindow overlay, bool visible); | |
33 | |
34 DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManagerViewsMac); | |
35 }; | |
36 | |
37 } // namespace constrained_window | |
OLD | NEW |