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

Side by Side Diff: components/mus/ws/server_window.h

Issue 1419793006: Makes windowmanager draw non-client area (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add include Created 5 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
« no previous file with comments | « components/mus/ws/event_dispatcher_unittest.cc ('k') | components/mus/ws/server_window.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_MUS_WS_SERVER_WINDOW_H_ 5 #ifndef COMPONENTS_MUS_WS_SERVER_WINDOW_H_
6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_H_ 6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "components/mus/public/interfaces/compositor_frame.mojom.h" 13 #include "components/mus/public/interfaces/compositor_frame.mojom.h"
14 #include "components/mus/public/interfaces/window_tree.mojom.h" 14 #include "components/mus/public/interfaces/window_tree.mojom.h"
15 #include "components/mus/ws/ids.h" 15 #include "components/mus/ws/ids.h"
16 #include "components/mus/ws/server_window_surface.h" 16 #include "components/mus/ws/server_window_surface.h"
17 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" 17 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
18 #include "ui/gfx/geometry/insets.h"
18 #include "ui/gfx/geometry/rect.h" 19 #include "ui/gfx/geometry/rect.h"
19 #include "ui/gfx/transform.h" 20 #include "ui/gfx/transform.h"
20 #include "ui/platform_window/text_input_state.h" 21 #include "ui/platform_window/text_input_state.h"
21 22
22 namespace mus { 23 namespace mus {
23
24 namespace ws { 24 namespace ws {
25 25
26 class ServerWindowDelegate; 26 class ServerWindowDelegate;
27 class ServerWindowObserver; 27 class ServerWindowObserver;
28 class ServerWindowSurfaceManager; 28 class ServerWindowSurfaceManager;
29 29
30 // Server side representation of a window. Delegate is informed of interesting 30 // Server side representation of a window. Delegate is informed of interesting
31 // events. 31 // events.
32 // 32 //
33 // It is assumed that all functions that mutate the tree have validated the 33 // It is assumed that all functions that mutate the tree have validated the
(...skipping 25 matching lines...) Expand all
59 void Remove(ServerWindow* child); 59 void Remove(ServerWindow* child);
60 void Reorder(ServerWindow* child, 60 void Reorder(ServerWindow* child,
61 ServerWindow* relative, 61 ServerWindow* relative,
62 mojom::OrderDirection direction); 62 mojom::OrderDirection direction);
63 63
64 const gfx::Rect& bounds() const { return bounds_; } 64 const gfx::Rect& bounds() const { return bounds_; }
65 // Sets the bounds. If the size changes this implicitly resets the client 65 // Sets the bounds. If the size changes this implicitly resets the client
66 // area to fill the whole bounds. 66 // area to fill the whole bounds.
67 void SetBounds(const gfx::Rect& bounds); 67 void SetBounds(const gfx::Rect& bounds);
68 68
69 const gfx::Rect& client_area() const { return client_area_; } 69 const gfx::Insets& client_area() const { return client_area_; }
70 void SetClientArea(const gfx::Rect& bounds); 70 void SetClientArea(const gfx::Insets& insets);
71 71
72 const ServerWindow* parent() const { return parent_; } 72 const ServerWindow* parent() const { return parent_; }
73 ServerWindow* parent() { return parent_; } 73 ServerWindow* parent() { return parent_; }
74 74
75 const ServerWindow* GetRoot() const; 75 const ServerWindow* GetRoot() const;
76 ServerWindow* GetRoot() { 76 ServerWindow* GetRoot() {
77 return const_cast<ServerWindow*>( 77 return const_cast<ServerWindow*>(
78 const_cast<const ServerWindow*>(this)->GetRoot()); 78 const_cast<const ServerWindow*>(this)->GetRoot());
79 } 79 }
80 80
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 // Implementation of removing a window. Doesn't send any notification. 131 // Implementation of removing a window. Doesn't send any notification.
132 void RemoveImpl(ServerWindow* window); 132 void RemoveImpl(ServerWindow* window);
133 133
134 ServerWindowDelegate* delegate_; 134 ServerWindowDelegate* delegate_;
135 const WindowId id_; 135 const WindowId id_;
136 ServerWindow* parent_; 136 ServerWindow* parent_;
137 Windows children_; 137 Windows children_;
138 bool visible_; 138 bool visible_;
139 gfx::Rect bounds_; 139 gfx::Rect bounds_;
140 gfx::Rect client_area_; 140 gfx::Insets client_area_;
141 scoped_ptr<ServerWindowSurfaceManager> surface_manager_; 141 scoped_ptr<ServerWindowSurfaceManager> surface_manager_;
142 float opacity_; 142 float opacity_;
143 gfx::Transform transform_; 143 gfx::Transform transform_;
144 ui::TextInputState text_input_state_; 144 ui::TextInputState text_input_state_;
145 145
146 std::map<std::string, std::vector<uint8_t>> properties_; 146 std::map<std::string, std::vector<uint8_t>> properties_;
147 147
148 base::ObserverList<ServerWindowObserver> observers_; 148 base::ObserverList<ServerWindowObserver> observers_;
149 149
150 DISALLOW_COPY_AND_ASSIGN(ServerWindow); 150 DISALLOW_COPY_AND_ASSIGN(ServerWindow);
151 }; 151 };
152 152
153 } // namespace ws 153 } // namespace ws
154
155 } // namespace mus 154 } // namespace mus
156 155
157 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_H_ 156 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_H_
OLDNEW
« no previous file with comments | « components/mus/ws/event_dispatcher_unittest.cc ('k') | components/mus/ws/server_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698