| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ |
| 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "ui/aura/mus/window_tree_host_mus.h" |
| 12 #include "ui/views/mus/mus_export.h" |
| 13 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" |
| 14 |
| 15 namespace views { |
| 16 |
| 17 class VIEWS_MUS_EXPORT DesktopWindowTreeHostMus |
| 18 : public DesktopWindowTreeHost, |
| 19 public aura::WindowTreeHostMus { |
| 20 public: |
| 21 DesktopWindowTreeHostMus( |
| 22 internal::NativeWidgetDelegate* native_widget_delegate, |
| 23 DesktopNativeWidgetAura* desktop_native_widget_aura); |
| 24 ~DesktopWindowTreeHostMus() override; |
| 25 |
| 26 private: |
| 27 bool IsDocked() const; |
| 28 |
| 29 // DesktopWindowTreeHost: |
| 30 void Init(aura::Window* content_window, |
| 31 const Widget::InitParams& params) override; |
| 32 void OnNativeWidgetCreated(const Widget::InitParams& params) override; |
| 33 std::unique_ptr<corewm::Tooltip> CreateTooltip() override; |
| 34 std::unique_ptr<aura::client::DragDropClient> CreateDragDropClient( |
| 35 DesktopNativeCursorManager* cursor_manager) override; |
| 36 void Close() override; |
| 37 void CloseNow() override; |
| 38 aura::WindowTreeHost* AsWindowTreeHost() override; |
| 39 void ShowWindowWithState(ui::WindowShowState state) override; |
| 40 void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) override; |
| 41 bool IsVisible() const override; |
| 42 void SetSize(const gfx::Size& size) override; |
| 43 void StackAbove(aura::Window* window) override; |
| 44 void StackAtTop() override; |
| 45 void CenterWindow(const gfx::Size& size) override; |
| 46 void GetWindowPlacement(gfx::Rect* bounds, |
| 47 ui::WindowShowState* show_state) const override; |
| 48 gfx::Rect GetWindowBoundsInScreen() const override; |
| 49 gfx::Rect GetClientAreaBoundsInScreen() const override; |
| 50 gfx::Rect GetRestoredBounds() const override; |
| 51 std::string GetWorkspace() const override; |
| 52 gfx::Rect GetWorkAreaBoundsInScreen() const override; |
| 53 void SetShape(std::unique_ptr<SkRegion> native_region) override; |
| 54 void Activate() override; |
| 55 void Deactivate() override; |
| 56 bool IsActive() const override; |
| 57 void Maximize() override; |
| 58 void Minimize() override; |
| 59 void Restore() override; |
| 60 bool IsMaximized() const override; |
| 61 bool IsMinimized() const override; |
| 62 bool HasCapture() const override; |
| 63 void SetAlwaysOnTop(bool always_on_top) override; |
| 64 bool IsAlwaysOnTop() const override; |
| 65 void SetVisibleOnAllWorkspaces(bool always_visible) override; |
| 66 bool IsVisibleOnAllWorkspaces() const override; |
| 67 bool SetWindowTitle(const base::string16& title) override; |
| 68 void ClearNativeFocus() override; |
| 69 Widget::MoveLoopResult RunMoveLoop( |
| 70 const gfx::Vector2d& drag_offset, |
| 71 Widget::MoveLoopSource source, |
| 72 Widget::MoveLoopEscapeBehavior escape_behavior) override; |
| 73 void EndMoveLoop() override; |
| 74 void SetVisibilityChangedAnimationsEnabled(bool value) override; |
| 75 bool ShouldUseNativeFrame() const override; |
| 76 bool ShouldWindowContentsBeTransparent() const override; |
| 77 void FrameTypeChanged() override; |
| 78 void SetFullscreen(bool fullscreen) override; |
| 79 bool IsFullscreen() const override; |
| 80 void SetOpacity(float opacity) override; |
| 81 void SetWindowIcons(const gfx::ImageSkia& window_icon, |
| 82 const gfx::ImageSkia& app_icon) override; |
| 83 void InitModalType(ui::ModalType modal_type) override; |
| 84 void FlashFrame(bool flash_frame) override; |
| 85 void OnRootViewLayout() override; |
| 86 bool IsAnimatingClosed() const override; |
| 87 bool IsTranslucentWindowOpacitySupported() const override; |
| 88 void SizeConstraintsChanged() override; |
| 89 |
| 90 internal::NativeWidgetDelegate* native_widget_delegate_; |
| 91 |
| 92 DesktopNativeWidgetAura* desktop_native_widget_aura_; |
| 93 |
| 94 // State to restore window to when exiting fullscreen. Only valid if |
| 95 // fullscreen. |
| 96 ui::WindowShowState fullscreen_restore_state_; |
| 97 |
| 98 // Used so that Close() isn't immediate. |
| 99 base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_; |
| 100 |
| 101 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus); |
| 102 }; |
| 103 |
| 104 } // namespace views |
| 105 |
| 106 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ |
| OLD | NEW |