| Index: ui/views/mus/desktop_window_tree_host_mus.h
|
| diff --git a/ui/views/mus/desktop_window_tree_host_mus.h b/ui/views/mus/desktop_window_tree_host_mus.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..da57ad174e76601cf00d789aa0da146344389244
|
| --- /dev/null
|
| +++ b/ui/views/mus/desktop_window_tree_host_mus.h
|
| @@ -0,0 +1,106 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_
|
| +#define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_
|
| +
|
| +#include <memory>
|
| +
|
| +#include "base/macros.h"
|
| +#include "ui/aura/mus/window_tree_host_mus.h"
|
| +#include "ui/views/mus/mus_export.h"
|
| +#include "ui/views/widget/desktop_aura/desktop_window_tree_host.h"
|
| +
|
| +namespace views {
|
| +
|
| +class VIEWS_MUS_EXPORT DesktopWindowTreeHostMus
|
| + : public DesktopWindowTreeHost,
|
| + public aura::WindowTreeHostMus {
|
| + public:
|
| + DesktopWindowTreeHostMus(
|
| + internal::NativeWidgetDelegate* native_widget_delegate,
|
| + DesktopNativeWidgetAura* desktop_native_widget_aura);
|
| + ~DesktopWindowTreeHostMus() override;
|
| +
|
| + private:
|
| + bool IsDocked() const;
|
| +
|
| + // DesktopWindowTreeHost:
|
| + void Init(aura::Window* content_window,
|
| + const Widget::InitParams& params) override;
|
| + void OnNativeWidgetCreated(const Widget::InitParams& params) override;
|
| + std::unique_ptr<corewm::Tooltip> CreateTooltip() override;
|
| + std::unique_ptr<aura::client::DragDropClient> CreateDragDropClient(
|
| + DesktopNativeCursorManager* cursor_manager) override;
|
| + void Close() override;
|
| + void CloseNow() override;
|
| + aura::WindowTreeHost* AsWindowTreeHost() override;
|
| + void ShowWindowWithState(ui::WindowShowState state) override;
|
| + void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) override;
|
| + bool IsVisible() const override;
|
| + void SetSize(const gfx::Size& size) override;
|
| + void StackAbove(aura::Window* window) override;
|
| + void StackAtTop() override;
|
| + void CenterWindow(const gfx::Size& size) override;
|
| + void GetWindowPlacement(gfx::Rect* bounds,
|
| + ui::WindowShowState* show_state) const override;
|
| + gfx::Rect GetWindowBoundsInScreen() const override;
|
| + gfx::Rect GetClientAreaBoundsInScreen() const override;
|
| + gfx::Rect GetRestoredBounds() const override;
|
| + std::string GetWorkspace() const override;
|
| + gfx::Rect GetWorkAreaBoundsInScreen() const override;
|
| + void SetShape(std::unique_ptr<SkRegion> native_region) override;
|
| + void Activate() override;
|
| + void Deactivate() override;
|
| + bool IsActive() const override;
|
| + void Maximize() override;
|
| + void Minimize() override;
|
| + void Restore() override;
|
| + bool IsMaximized() const override;
|
| + bool IsMinimized() const override;
|
| + bool HasCapture() const override;
|
| + void SetAlwaysOnTop(bool always_on_top) override;
|
| + bool IsAlwaysOnTop() const override;
|
| + void SetVisibleOnAllWorkspaces(bool always_visible) override;
|
| + bool IsVisibleOnAllWorkspaces() const override;
|
| + bool SetWindowTitle(const base::string16& title) override;
|
| + void ClearNativeFocus() override;
|
| + Widget::MoveLoopResult RunMoveLoop(
|
| + const gfx::Vector2d& drag_offset,
|
| + Widget::MoveLoopSource source,
|
| + Widget::MoveLoopEscapeBehavior escape_behavior) override;
|
| + void EndMoveLoop() override;
|
| + void SetVisibilityChangedAnimationsEnabled(bool value) override;
|
| + bool ShouldUseNativeFrame() const override;
|
| + bool ShouldWindowContentsBeTransparent() const override;
|
| + void FrameTypeChanged() override;
|
| + void SetFullscreen(bool fullscreen) override;
|
| + bool IsFullscreen() const override;
|
| + void SetOpacity(float opacity) override;
|
| + void SetWindowIcons(const gfx::ImageSkia& window_icon,
|
| + const gfx::ImageSkia& app_icon) override;
|
| + void InitModalType(ui::ModalType modal_type) override;
|
| + void FlashFrame(bool flash_frame) override;
|
| + void OnRootViewLayout() override;
|
| + bool IsAnimatingClosed() const override;
|
| + bool IsTranslucentWindowOpacitySupported() const override;
|
| + void SizeConstraintsChanged() override;
|
| +
|
| + internal::NativeWidgetDelegate* native_widget_delegate_;
|
| +
|
| + DesktopNativeWidgetAura* desktop_native_widget_aura_;
|
| +
|
| + // State to restore window to when exiting fullscreen. Only valid if
|
| + // fullscreen.
|
| + ui::WindowShowState fullscreen_restore_state_;
|
| +
|
| + // Used so that Close() isn't immediate.
|
| + base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus);
|
| +};
|
| +
|
| +} // namespace views
|
| +
|
| +#endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_
|
|
|