mac: Override NativeWidgetMac
This commit is contained in:
parent
37a7df49d6
commit
9bc79f840e
3 changed files with 52 additions and 0 deletions
28
atom/browser/ui/cocoa/atom_native_widget_mac.h
Normal file
28
atom/browser/ui/cocoa/atom_native_widget_mac.h
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
// Copyright (c) 2018 GitHub, Inc.
|
||||||
|
// Use of this source code is governed by the MIT license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
#ifndef ATOM_BROWSER_UI_COCOA_ATOM_NATIVE_WIDGET_MAC_H_
|
||||||
|
#define ATOM_BROWSER_UI_COCOA_ATOM_NATIVE_WIDGET_MAC_H_
|
||||||
|
|
||||||
|
#include "ui/views/widget/native_widget_mac.h"
|
||||||
|
|
||||||
|
namespace atom {
|
||||||
|
|
||||||
|
class AtomNativeWidgetMac : public views::NativeWidgetMac {
|
||||||
|
public:
|
||||||
|
explicit AtomNativeWidgetMac(views::internal::NativeWidgetDelegate* delegate);
|
||||||
|
~AtomNativeWidgetMac() override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// NativeWidgetMac:
|
||||||
|
views::NativeWidgetMacNSWindow* CreateNSWindow(
|
||||||
|
const views::Widget::InitParams& params) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DISALLOW_COPY_AND_ASSIGN(AtomNativeWidgetMac);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace atom
|
||||||
|
|
||||||
|
#endif // ATOM_BROWSER_UI_COCOA_ATOM_NATIVE_WIDGET_MAC_H_
|
22
atom/browser/ui/cocoa/atom_native_widget_mac.mm
Normal file
22
atom/browser/ui/cocoa/atom_native_widget_mac.mm
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
// 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"
|
||||||
|
|
||||||
|
namespace atom {
|
||||||
|
|
||||||
|
AtomNativeWidgetMac::AtomNativeWidgetMac(
|
||||||
|
views::internal::NativeWidgetDelegate* delegate)
|
||||||
|
: views::NativeWidgetMac(delegate) {
|
||||||
|
}
|
||||||
|
|
||||||
|
AtomNativeWidgetMac::~AtomNativeWidgetMac() {
|
||||||
|
}
|
||||||
|
|
||||||
|
views::NativeWidgetMacNSWindow* AtomNativeWidgetMac::CreateNSWindow(
|
||||||
|
const views::Widget::InitParams& params) {
|
||||||
|
return views::NativeWidgetMac::CreateNSWindow(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace atom
|
|
@ -316,6 +316,8 @@
|
||||||
'atom/browser/ui/cocoa/atom_bundle_mover.mm',
|
'atom/browser/ui/cocoa/atom_bundle_mover.mm',
|
||||||
'atom/browser/ui/cocoa/atom_menu_controller.h',
|
'atom/browser/ui/cocoa/atom_menu_controller.h',
|
||||||
'atom/browser/ui/cocoa/atom_menu_controller.mm',
|
'atom/browser/ui/cocoa/atom_menu_controller.mm',
|
||||||
|
'atom/browser/ui/cocoa/atom_native_widget_mac.h',
|
||||||
|
'atom/browser/ui/cocoa/atom_native_widget_mac.mm',
|
||||||
'atom/browser/ui/cocoa/atom_touch_bar.h',
|
'atom/browser/ui/cocoa/atom_touch_bar.h',
|
||||||
'atom/browser/ui/cocoa/atom_touch_bar.mm',
|
'atom/browser/ui/cocoa/atom_touch_bar.mm',
|
||||||
'atom/browser/ui/cocoa/views_delegate_mac.h',
|
'atom/browser/ui/cocoa/views_delegate_mac.h',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue