atom_native_widget_mac.mm 786 B

12345678910111213141516171819202122232425262728
  1. // Copyright (c) 2018 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #include "atom/browser/ui/cocoa/atom_native_widget_mac.h"
  5. #include "atom/browser/ui/cocoa/atom_ns_window.h"
  6. namespace atom {
  7. AtomNativeWidgetMac::AtomNativeWidgetMac(
  8. NativeWindowMac* shell,
  9. NSUInteger style_mask,
  10. views::internal::NativeWidgetDelegate* delegate)
  11. : views::NativeWidgetMac(delegate),
  12. shell_(shell),
  13. style_mask_(style_mask) {}
  14. AtomNativeWidgetMac::~AtomNativeWidgetMac() {}
  15. NativeWidgetMacNSWindow* AtomNativeWidgetMac::CreateNSWindow(
  16. const views::Widget::InitParams& params) {
  17. return [[[AtomNSWindow alloc] initWithShell:shell_ styleMask:style_mask_]
  18. autorelease];
  19. }
  20. } // namespace atom