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

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

Issue 2507963002: Implement hit tests/client area. (Closed)
Patch Set: Merge with tot Created 4 years, 1 month 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
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 Widget::InitParams& init_params); 30 const Widget::InitParams& init_params);
29 ~DesktopWindowTreeHostMus() override; 31 ~DesktopWindowTreeHostMus() override;
30 32
31 private: 33 private:
32 bool IsDocked() const; 34 bool IsDocked() const;
33 35
36 void UpdateClientArea();
sky 2016/11/19 15:29:31 optional: It isn't clear what these do. Maybe Send
Elliot Glaysher 2016/11/22 00:48:07 Done.
37 void UpdateHitTestMask();
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void SetOpacity(float opacity) override; 90 void SetOpacity(float opacity) override;
86 void SetWindowIcons(const gfx::ImageSkia& window_icon, 91 void SetWindowIcons(const gfx::ImageSkia& window_icon,
87 const gfx::ImageSkia& app_icon) override; 92 const gfx::ImageSkia& app_icon) override;
88 void InitModalType(ui::ModalType modal_type) override; 93 void InitModalType(ui::ModalType modal_type) override;
89 void FlashFrame(bool flash_frame) override; 94 void FlashFrame(bool flash_frame) override;
90 void OnRootViewLayout() override; 95 void OnRootViewLayout() override;
91 bool IsAnimatingClosed() const override; 96 bool IsAnimatingClosed() const override;
92 bool IsTranslucentWindowOpacitySupported() const override; 97 bool IsTranslucentWindowOpacitySupported() const override;
93 void SizeConstraintsChanged() override; 98 void SizeConstraintsChanged() override;
94 99
100 // MusClientObserver:
101 void OnWindowManagerFrameValuesChanged() override;
102
95 // WindowTreeHostMus: 103 // WindowTreeHostMus:
96 void ShowImpl() override; 104 void ShowImpl() override;
97 void HideImpl() override; 105 void HideImpl() override;
98 void SetBounds(const gfx::Rect& bounds_in_pixels) override; 106 void SetBounds(const gfx::Rect& bounds_in_pixels) override;
99 107
100 // aura::EnvObserver: 108 // aura::EnvObserver:
101 void OnWindowInitialized(aura::Window* window) override; 109 void OnWindowInitialized(aura::Window* window) override;
102 void OnActiveFocusClientChanged(aura::client::FocusClient* focus_client, 110 void OnActiveFocusClientChanged(aura::client::FocusClient* focus_client,
103 aura::Window* window) override; 111 aura::Window* window) override;
104 112
(...skipping 14 matching lines...) Expand all
119 127
120 // Used so that Close() isn't immediate. 128 // Used so that Close() isn't immediate.
121 base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_; 129 base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_;
122 130
123 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus); 131 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus);
124 }; 132 };
125 133
126 } // namespace views 134 } // namespace views
127 135
128 #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

Powered by Google App Engine
This is Rietveld 408576698