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

Unified Diff: ui/views/widget/native_widget_mac.mm

Issue 2551773002: MacViews: Exploring removal of window-modal sheets.
Patch Set: Created 4 years 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
« no previous file with comments | « extensions/components/native_app_window/native_app_window_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_mac.mm
diff --git a/ui/views/widget/native_widget_mac.mm b/ui/views/widget/native_widget_mac.mm
index e81bba45df906f90e4c03351acf778f22318c7a0..9c935c1217c29eb898f544ccf1d0a8cac1e5ec67 100644
--- a/ui/views/widget/native_widget_mac.mm
+++ b/ui/views/widget/native_widget_mac.mm
@@ -45,11 +45,15 @@
namespace views {
namespace {
+bool SheetsEnabled() {
+ return false;
+}
+
NSInteger StyleMaskForParams(const Widget::InitParams& params) {
// If the Widget is modal, it will be displayed as a sheet. This works best if
// it has NSTitledWindowMask. For example, with NSBorderlessWindowMask, the
// parent window still accepts input.
- if (params.delegate &&
+ if (SheetsEnabled() && params.delegate &&
params.delegate->GetModalType() == ui::MODAL_TYPE_WINDOW)
return NSTitledWindowMask;
@@ -96,7 +100,7 @@ BridgedNativeWidget* NativeWidgetMac::GetBridgeForNativeWindow(
}
bool NativeWidgetMac::IsWindowModalSheet() const {
- return bridge_ && bridge_->parent() &&
+ return SheetsEnabled() && bridge_ && bridge_->parent() &&
GetWidget()->widget_delegate()->GetModalType() ==
ui::MODAL_TYPE_WINDOW;
}
« no previous file with comments | « extensions/components/native_app_window/native_app_window_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698