Include CanFocus on Windows and map to state

This commit is contained in:
Kevin Sawicki 2017-02-13 15:21:55 -08:00
parent 0ac3969c6a
commit be79417a03
6 changed files with 63 additions and 5 deletions

View file

@ -0,0 +1,20 @@
// Copyright (c) 2017 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/win/atom_desktop_native_widget_aura.h"
namespace atom {
AtomDeskopNativeWidgetAura::AtomDeskopNativeWidgetAura(
views::internal::NativeWidgetDelegate* delegate,
NativeWindowViews* window)
: views::DesktopNativeWidgetAura(delegate),
window_(window) {
}
bool AtomDeskopNativeWidgetAura::CanFocus() {
return window_->CanFocus();
}
} // namespace atom

View file

@ -0,0 +1,29 @@
// Copyright (c) 2017 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_WIN_ATOM_DESKTOP_NATIVE_WIDGET_AURA_H_
#define ATOM_BROWSER_UI_WIN_ATOM_DESKTOP_NATIVE_WIDGET_AURA_H_
#include "atom/browser/native_window_views.h"
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
namespace atom {
class AtomDeskopNativeWidgetAura : public views::DesktopNativeWidgetAura {
public:
AtomDeskopNativeWidgetAura(views::internal::NativeWidgetDelegate* delegate,
NativeWindowViews* window);
// aura::WindowDelegate
bool CanFocus() override;
private:
NativeWindowViews* window_;
DISALLOW_COPY_AND_ASSIGN(AtomDeskopNativeWidgetAura);
};
} // namespace atom
#endif // ATOM_BROWSER_UI_WIN_ATOM_DESKTOP_NATIVE_WIDGET_AURA_H_