electron/atom/browser/ui/cocoa/atom_native_widget_mac.mm

30 lines
911 B
Text
Raw Normal View History

2018-04-19 06:36:14 +00:00
// Copyright (c) 2018 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/ui/cocoa/atom_native_widget_mac.h"
2018-04-24 08:23:08 +00:00
#include "atom/browser/ui/cocoa/atom_ns_window.h"
#include "ui/base/cocoa/window_size_constants.h"
2018-04-19 06:36:14 +00:00
namespace atom {
AtomNativeWidgetMac::AtomNativeWidgetMac(
2018-04-24 08:23:08 +00:00
NSUInteger style_mask,
2018-04-19 06:36:14 +00:00
views::internal::NativeWidgetDelegate* delegate)
2018-04-24 08:23:08 +00:00
: views::NativeWidgetMac(delegate),
style_mask_(style_mask) {}
2018-04-19 06:36:14 +00:00
2018-04-20 18:47:04 +00:00
AtomNativeWidgetMac::~AtomNativeWidgetMac() {}
2018-04-19 06:36:14 +00:00
NativeWidgetMacNSWindow* AtomNativeWidgetMac::CreateNSWindow(
2018-04-19 06:36:14 +00:00
const views::Widget::InitParams& params) {
2018-04-24 08:23:08 +00:00
return [[[AtomNSWindow alloc]
initWithContentRect:ui::kWindowSizeDeterminedLater
styleMask:style_mask_
backing:NSBackingStoreBuffered
defer:YES] autorelease];
2018-04-19 06:36:14 +00:00
}
} // namespace atom