| Index: ui/views/views_delegate.h
|
| diff --git a/ui/views/views_delegate.h b/ui/views/views_delegate.h
|
| index 6a784af5fabab6edee098c241b1e1f4e09ff8352..04324b50a4edba52b08125bd4bd80a32b436a015 100644
|
| --- a/ui/views/views_delegate.h
|
| +++ b/ui/views/views_delegate.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef UI_VIEWS_VIEWS_DELEGATE_H_
|
| #define UI_VIEWS_VIEWS_DELEGATE_H_
|
|
|
| +#include <memory>
|
| #include <string>
|
|
|
| #if defined(OS_WIN)
|
| @@ -51,6 +52,8 @@ class View;
|
| class Widget;
|
|
|
| #if defined(USE_AURA)
|
| +class DesktopNativeWidgetAura;
|
| +class DesktopWindowTreeHost;
|
| class TouchSelectionMenuRunnerViews;
|
| #endif
|
|
|
| @@ -98,6 +101,14 @@ class VIEWS_EXPORT ViewsDelegate {
|
| using NativeWidgetFactory =
|
| base::Callback<NativeWidget*(const Widget::InitParams&,
|
| internal::NativeWidgetDelegate*)>;
|
| +#if defined(USE_AURA)
|
| + using DesktopWindowTreeHostFactory =
|
| + base::Callback<std::unique_ptr<DesktopWindowTreeHost>(
|
| + const Widget::InitParams&,
|
| + internal::NativeWidgetDelegate*,
|
| + DesktopNativeWidgetAura*)>;
|
| +#endif
|
| +
|
| #if defined(OS_WIN)
|
| enum AppbarAutohideEdge {
|
| EDGE_TOP = 1 << 0,
|
| @@ -124,13 +135,22 @@ class VIEWS_EXPORT ViewsDelegate {
|
|
|
| // Call this method to set a factory callback that will be used to construct
|
| // NativeWidget implementations overriding the platform defaults.
|
| - void set_native_widget_factory(NativeWidgetFactory factory) {
|
| + void set_native_widget_factory(const NativeWidgetFactory& factory) {
|
| native_widget_factory_ = factory;
|
| }
|
| - const NativeWidgetFactory& native_widget_factory() {
|
| + const NativeWidgetFactory& native_widget_factory() const {
|
| return native_widget_factory_;
|
| }
|
|
|
| +#if defined(USE_AURA)
|
| + void set_desktop_window_tree_host_factory(
|
| + const DesktopWindowTreeHostFactory& factory) {
|
| + desktop_window_tree_host_factory_ = factory;
|
| + }
|
| + const DesktopWindowTreeHostFactory& desktop_window_tree_host_factory() const {
|
| + return desktop_window_tree_host_factory_;
|
| + }
|
| +#endif
|
| // Saves the position, size and "show" state for the window with the
|
| // specified name.
|
| virtual void SaveWindowPlacement(const Widget* widget,
|
| @@ -240,6 +260,8 @@ class VIEWS_EXPORT ViewsDelegate {
|
|
|
| #if defined(USE_AURA)
|
| std::unique_ptr<TouchSelectionMenuRunnerViews> touch_selection_menu_runner_;
|
| +
|
| + DesktopWindowTreeHostFactory desktop_window_tree_host_factory_;
|
| #endif
|
|
|
| NativeWidgetFactory native_widget_factory_;
|
|
|