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

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

Issue 2581503002: Adds additional_client_area to client area (Closed)
Patch Set: merge 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
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
(...skipping 19 matching lines...) Expand all
30 public: 30 public:
31 DesktopWindowTreeHostMus( 31 DesktopWindowTreeHostMus(
32 internal::NativeWidgetDelegate* native_widget_delegate, 32 internal::NativeWidgetDelegate* native_widget_delegate,
33 DesktopNativeWidgetAura* desktop_native_widget_aura, 33 DesktopNativeWidgetAura* desktop_native_widget_aura,
34 const std::map<std::string, std::vector<uint8_t>>* mus_properties); 34 const std::map<std::string, std::vector<uint8_t>>* mus_properties);
35 ~DesktopWindowTreeHostMus() override; 35 ~DesktopWindowTreeHostMus() override;
36 36
37 // Called when the window was deleted on the server. 37 // Called when the window was deleted on the server.
38 void ServerDestroyedWindow() { CloseNow(); } 38 void ServerDestroyedWindow() { CloseNow(); }
39 39
40 // Controls whether the client area is automatically updated as necessary.
41 void set_auto_update_client_area(bool value) {
42 auto_update_client_area_ = value;
43 }
44
40 private: 45 private:
41 bool IsDocked() const; 46 bool IsDocked() const;
42 47
43 void SendClientAreaToServer(); 48 void SendClientAreaToServer();
44 void SendHitTestMaskToServer(); 49 void SendHitTestMaskToServer();
45 50
46 // Helper function to get the scale factor. 51 // Helper function to get the scale factor.
47 float GetScaleFactor() const; 52 float GetScaleFactor() const;
48 53
49 void SetBoundsInDIP(const gfx::Rect& bounds_in_dip); 54 void SetBoundsInDIP(const gfx::Rect& bounds_in_dip);
50 55
56 // Returns true if the client area should be set on this.
57 bool ShouldSendClientAreaToServer() const;
58
51 // DesktopWindowTreeHost: 59 // DesktopWindowTreeHost:
52 void Init(aura::Window* content_window, 60 void Init(aura::Window* content_window,
53 const Widget::InitParams& params) override; 61 const Widget::InitParams& params) override;
54 void OnNativeWidgetCreated(const Widget::InitParams& params) override; 62 void OnNativeWidgetCreated(const Widget::InitParams& params) override;
55 void OnWidgetInitDone() override; 63 void OnWidgetInitDone() override;
56 std::unique_ptr<corewm::Tooltip> CreateTooltip() override; 64 std::unique_ptr<corewm::Tooltip> CreateTooltip() override;
57 std::unique_ptr<aura::client::DragDropClient> CreateDragDropClient( 65 std::unique_ptr<aura::client::DragDropClient> CreateDragDropClient(
58 DesktopNativeCursorManager* cursor_manager) override; 66 DesktopNativeCursorManager* cursor_manager) override;
59 void Close() override; 67 void Close() override;
60 void CloseNow() override; 68 void CloseNow() override;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 143
136 // We can optionally have a parent which can order us to close, or own 144 // We can optionally have a parent which can order us to close, or own
137 // children who we're responsible for closing when we CloseNow(). 145 // children who we're responsible for closing when we CloseNow().
138 DesktopWindowTreeHostMus* parent_ = nullptr; 146 DesktopWindowTreeHostMus* parent_ = nullptr;
139 std::set<DesktopWindowTreeHostMus*> children_; 147 std::set<DesktopWindowTreeHostMus*> children_;
140 148
141 bool is_active_ = false; 149 bool is_active_ = false;
142 150
143 std::unique_ptr<wm::CursorManager> cursor_manager_; 151 std::unique_ptr<wm::CursorManager> cursor_manager_;
144 152
153 bool auto_update_client_area_ = true;
154
145 // Used so that Close() isn't immediate. 155 // Used so that Close() isn't immediate.
146 base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_; 156 base::WeakPtrFactory<DesktopWindowTreeHostMus> close_widget_factory_;
147 157
148 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus); 158 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostMus);
149 }; 159 };
150 160
151 } // namespace views 161 } // namespace views
152 162
153 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_ 163 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_MUS_H_
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_host_mus_unittest.cc ('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