refactor: rename the atom directory to shell
This commit is contained in:
parent
4575a4aae3
commit
d7f07e8a80
631 changed files with 0 additions and 0 deletions
43
shell/browser/ui/cocoa/views_delegate_mac.mm
Normal file
43
shell/browser/ui/cocoa/views_delegate_mac.mm
Normal file
|
@ -0,0 +1,43 @@
|
|||
// 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/views_delegate_mac.h"
|
||||
|
||||
#include "content/public/browser/context_factory.h"
|
||||
#include "ui/views/widget/native_widget_mac.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
ViewsDelegateMac::ViewsDelegateMac() {}
|
||||
|
||||
ViewsDelegateMac::~ViewsDelegateMac() {}
|
||||
|
||||
void ViewsDelegateMac::OnBeforeWidgetInit(
|
||||
views::Widget::InitParams* params,
|
||||
views::internal::NativeWidgetDelegate* delegate) {
|
||||
// If we already have a native_widget, we don't have to try to come
|
||||
// up with one.
|
||||
if (params->native_widget)
|
||||
return;
|
||||
|
||||
if (!native_widget_factory().is_null()) {
|
||||
params->native_widget = native_widget_factory().Run(*params, delegate);
|
||||
if (params->native_widget)
|
||||
return;
|
||||
}
|
||||
|
||||
// Setting null here causes Widget to create the default NativeWidget
|
||||
// implementation.
|
||||
params->native_widget = nullptr;
|
||||
}
|
||||
|
||||
ui::ContextFactory* ViewsDelegateMac::GetContextFactory() {
|
||||
return content::GetContextFactory();
|
||||
}
|
||||
|
||||
ui::ContextFactoryPrivate* ViewsDelegateMac::GetContextFactoryPrivate() {
|
||||
return content::GetContextFactoryPrivate();
|
||||
}
|
||||
|
||||
} // namespace atom
|
Loading…
Add table
Add a link
Reference in a new issue