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

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

Issue 1474543002: Makes NewWindow() take set of properties for window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nuke shadow_style changes Created 5 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 | « components/mus/ws/connection_manager.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"
(...skipping 22 matching lines...) Expand all
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
34 // mutation is possible before hand. For example, Reorder() assumes the supplied 34 // mutation is possible before hand. For example, Reorder() assumes the supplied
35 // window is a child and not already in position. 35 // window is a child and not already in position.
36 // 36 //
37 // ServerWindows do not own their children. If you delete a window that has 37 // ServerWindows do not own their children. If you delete a window that has
38 // children the children are implicitly removed. Similarly if a window has a 38 // children the children are implicitly removed. Similarly if a window has a
39 // parent and the window is deleted the deleted window is implicitly removed 39 // parent and the window is deleted the deleted window is implicitly removed
40 // from the parent. 40 // from the parent.
41 class ServerWindow { 41 class ServerWindow {
42 public: 42 public:
43 using Properties = std::map<std::string, std::vector<uint8_t>>;
43 using Windows = std::vector<ServerWindow*>; 44 using Windows = std::vector<ServerWindow*>;
44 45
45 ServerWindow(ServerWindowDelegate* delegate, const WindowId& id); 46 ServerWindow(ServerWindowDelegate* delegate, const WindowId& id);
47 ServerWindow(ServerWindowDelegate* delegate,
48 const WindowId& id,
49 const Properties& properties);
46 ~ServerWindow(); 50 ~ServerWindow();
47 51
48 void AddObserver(ServerWindowObserver* observer); 52 void AddObserver(ServerWindowObserver* observer);
49 void RemoveObserver(ServerWindowObserver* observer); 53 void RemoveObserver(ServerWindowObserver* observer);
50 54
51 // Creates a new surface of the specified type, replacing the existing. 55 // Creates a new surface of the specified type, replacing the existing.
52 void CreateSurface(mojom::SurfaceType surface_type, 56 void CreateSurface(mojom::SurfaceType surface_type,
53 mojo::InterfaceRequest<mojom::Surface> request, 57 mojo::InterfaceRequest<mojom::Surface> request,
54 mojom::SurfaceClientPtr client); 58 mojom::SurfaceClientPtr client);
55 59
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 174
171 bool visible_; 175 bool visible_;
172 gfx::Rect bounds_; 176 gfx::Rect bounds_;
173 gfx::Insets client_area_; 177 gfx::Insets client_area_;
174 scoped_ptr<ServerWindowSurfaceManager> surface_manager_; 178 scoped_ptr<ServerWindowSurfaceManager> surface_manager_;
175 float opacity_; 179 float opacity_;
176 bool can_focus_; 180 bool can_focus_;
177 gfx::Transform transform_; 181 gfx::Transform transform_;
178 ui::TextInputState text_input_state_; 182 ui::TextInputState text_input_state_;
179 183
180 std::map<std::string, std::vector<uint8_t>> properties_; 184 Properties properties_;
181 185
182 base::ObserverList<ServerWindowObserver> observers_; 186 base::ObserverList<ServerWindowObserver> observers_;
183 187
184 DISALLOW_COPY_AND_ASSIGN(ServerWindow); 188 DISALLOW_COPY_AND_ASSIGN(ServerWindow);
185 }; 189 };
186 190
187 } // namespace ws 191 } // namespace ws
188 } // namespace mus 192 } // namespace mus
189 193
190 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_H_ 194 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_H_
OLDNEW
« no previous file with comments | « components/mus/ws/connection_manager.cc ('k') | components/mus/ws/server_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698