Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Side by Side Diff: ui/views/mus/desktop_window_tree_host_mus.h

Issue 2507963002: Implement hit tests/client area. (Closed)
Patch Set: add it back Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/mus/BUILD.gn ('k') | ui/views/mus/desktop_window_tree_host_mus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ 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_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "ui/aura/env_observer.h" 12 #include "ui/aura/env_observer.h"
13 #include "ui/aura/mus/window_tree_host_mus.h" 13 #include "ui/aura/mus/window_tree_host_mus.h"
14 #include "ui/views/mus/mus_client_observer.h"
14 #include "ui/views/mus/mus_export.h" 15 #include "ui/views/mus/mus_export.h"
15 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h" 16 #include "ui/views/widget/desktop_aura/desktop_window_tree_host.h"
16 #include "ui/views/widget/widget.h" 17 #include "ui/views/widget/widget.h"
17 18
18 namespace views { 19 namespace views {
19 20
20 class VIEWS_MUS_EXPORT DesktopWindowTreeHostMus 21 class VIEWS_MUS_EXPORT DesktopWindowTreeHostMus
21 : public DesktopWindowTreeHost, 22 : public DesktopWindowTreeHost,
23 public MusClientObserver,
22 public aura::WindowTreeHostMus, 24 public aura::WindowTreeHostMus,
23 public aura::EnvObserver { 25 public aura::EnvObserver {
24 public: 26 public:
25 DesktopWindowTreeHostMus( 27 DesktopWindowTreeHostMus(
26 internal::NativeWidgetDelegate* native_widget_delegate, 28 internal::NativeWidgetDelegate* native_widget_delegate,
27 DesktopNativeWidgetAura* desktop_native_widget_aura, 29 DesktopNativeWidgetAura* desktop_native_widget_aura,
28 const std::map<std::string, std::vector<uint8_t>>* mus_properties); 30 const std::map<std::string, std::vector<uint8_t>>* mus_properties);
29 ~DesktopWindowTreeHostMus() override; 31 ~DesktopWindowTreeHostMus() override;
30 32
31 private: 33 private:
32 bool IsDocked() const; 34 bool IsDocked() const;
33 35
36 void SendClientAreaToServer();
37 void SendHitTestMaskToServer();
38
34 // DesktopWindowTreeHost: 39 // DesktopWindowTreeHost:
35 void Init(aura::Window* content_window, 40 void Init(aura::Window* content_window,
36 const Widget::InitParams& params) override; 41 const Widget::InitParams& params) override;
37 void OnNativeWidgetCreated(const Widget::InitParams& params) override; 42 void OnNativeWidgetCreated(const Widget::InitParams& params) override;
38 std::unique_ptr<corewm::Tooltip> CreateTooltip() override; 43 std::unique_ptr<corewm::Tooltip> CreateTooltip() override;
39 std::unique_ptr<aura::client::DragDropClient> CreateDragDropClient( 44 std::unique_ptr<aura::client::DragDropClient> CreateDragDropClient(
40 DesktopNativeCursorManager* cursor_manager) override; 45 DesktopNativeCursorManager* cursor_manager) override;
41 void Close() override; 46 void Close() override;
42 void CloseNow() override; 47 void CloseNow() override;
43 aura::WindowTreeHost* AsWindowTreeHost() override; 48 aura::WindowTreeHost* AsWindowTreeHost() override;
(...skipping 26 matching lines...) Expand all
70 void SetVisibleOnAllWorkspaces(bool always_visible) override; 75 void SetVisibleOnAllWorkspaces(bool always_visible) override;
71 bool IsVisibleOnAllWorkspaces() const override; 76 bool IsVisibleOnAllWorkspaces() const override;
72 bool SetWindowTitle(const base::string16& title) override; 77 bool SetWindowTitle(const base::string16& title) override;
73 void ClearNativeFocus() override; 78 void ClearNativeFocus() override;
74 Widget::MoveLoopResult RunMoveLoop( 79 Widget::MoveLoopResult RunMoveLoop(
75 const gfx::Vector2d& drag_offset, 80 const gfx::Vector2d& drag_offset,
76 Widget::MoveLoopSource source, 81 Widget::MoveLoopSource source,
77 Widget::MoveLoopEscapeBehavior escape_behavior) override; 82 Widget::MoveLoopEscapeBehavior escape_behavior) override;
78 void EndMoveLoop() override; 83 void EndMoveLoop() override;
79 void SetVisibilityChangedAnimationsEnabled(bool value) override; 84 void SetVisibilityChangedAnimationsEnabled(bool value) override;
85 NonClientFrameView* CreateNonClientFrameView() override;
80 bool ShouldUseNativeFrame() const override; 86 bool ShouldUseNativeFrame() const override;
81 bool ShouldWindowContentsBeTransparent() const override; 87 bool ShouldWindowContentsBeTransparent() const override;
82 void FrameTypeChanged() override; 88 void FrameTypeChanged() override;
83 void SetFullscreen(bool fullscreen) override; 89 void SetFullscreen(bool fullscreen) override;
84 bool IsFullscreen() const override; 90 bool IsFullscreen() const override;
85 void SetOpacity(float opacity) override; 91 void SetOpacity(float opacity) override;
86 void SetWindowIcons(const gfx::ImageSkia& window_icon, 92 void SetWindowIcons(const gfx::ImageSkia& window_icon,
87 const gfx::ImageSkia& app_icon) override; 93 const gfx::ImageSkia& app_icon) override;
88 void InitModalType(ui::ModalType modal_type) override; 94 void InitModalType(ui::ModalType modal_type) override;
89 void FlashFrame(bool flash_frame) override; 95 void FlashFrame(bool flash_frame) override;
90 bool IsAnimatingClosed() const override; 96 bool IsAnimatingClosed() const override;
91 bool IsTranslucentWindowOpacitySupported() const override; 97 bool IsTranslucentWindowOpacitySupported() const override;
92 void SizeConstraintsChanged() override; 98 void SizeConstraintsChanged() override;
93 99
100 // MusClientObserver:
101 void OnWindowManagerFrameValuesChanged() override;
102
94 // WindowTreeHostMus: 103 // WindowTreeHostMus:
95 void ShowImpl() override; 104 void ShowImpl() override;
96 void HideImpl() override; 105 void HideImpl() override;
97 void SetBounds(const gfx::Rect& bounds_in_pixels) override; 106 void SetBounds(const gfx::Rect& bounds_in_pixels) override;
98 107
99 // aura::EnvObserver: 108 // aura::EnvObserver:
100 void OnWindowInitialized(aura::Window* window) override; 109 void OnWindowInitialized(aura::Window* window) override;
101 void OnActiveFocusClientChanged(aura::client::FocusClient* focus_client, 110 void OnActiveFocusClientChanged(aura::client::FocusClient* focus_client,
102 aura::Window* window) override; 111 aura::Window* window) override;
103 112
(...skipping 14 matching lines...) Expand all
118 127
119 // Used so that Close() isn't immediate. 128 // Used so that Close() isn't immediate.
120 base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_; 129 base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_;
121 130
122 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus); 131 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus);
123 }; 132 };
124 133
125 } // namespace views 134 } // namespace views
126 135
127 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ 136 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_
OLDNEW
« no previous file with comments | « ui/views/mus/BUILD.gn ('k') | ui/views/mus/desktop_window_tree_host_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698