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

Side by Side Diff: services/ui/ws/server_window.h

Issue 2400723003: Mus+Ash: Use standard cc mechanism for surface lifetime. (Closed)
Patch Set: Only add window observer if we're adding the dependency for the first time Created 4 years, 2 months 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 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 SERVICES_UI_WS_SERVER_WINDOW_H_ 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_H_
6 #define SERVICES_UI_WS_SERVER_WINDOW_H_ 6 #define SERVICES_UI_WS_SERVER_WINDOW_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void set_can_focus(bool can_focus) { can_focus_ = can_focus; } 154 void set_can_focus(bool can_focus) { can_focus_ = can_focus; }
155 bool can_focus() const { return can_focus_; } 155 bool can_focus() const { return can_focus_; }
156 156
157 void set_can_accept_events(bool value) { can_accept_events_ = value; } 157 void set_can_accept_events(bool value) { can_accept_events_ = value; }
158 bool can_accept_events() const { return can_accept_events_; } 158 bool can_accept_events() const { return can_accept_events_; }
159 159
160 // Returns true if this window is attached to a root and all ancestors are 160 // Returns true if this window is attached to a root and all ancestors are
161 // visible. 161 // visible.
162 bool IsDrawn() const; 162 bool IsDrawn() const;
163 163
164 // Called when its appropriate to destroy surfaces scheduled for destruction.
165 void DestroySurfacesScheduledForDestruction();
166
167 const gfx::Insets& extended_hit_test_region() const { 164 const gfx::Insets& extended_hit_test_region() const {
168 return extended_hit_test_region_; 165 return extended_hit_test_region_;
169 } 166 }
170 void set_extended_hit_test_region(const gfx::Insets& insets) { 167 void set_extended_hit_test_region(const gfx::Insets& insets) {
171 extended_hit_test_region_ = insets; 168 extended_hit_test_region_ = insets;
172 } 169 }
173 170
174 ServerWindowSurfaceManager* GetOrCreateSurfaceManager(); 171 ServerWindowSurfaceManager* GetOrCreateSurfaceManager();
175 ServerWindowSurfaceManager* surface_manager() { 172 ServerWindowSurfaceManager* surface_manager() {
176 return surface_manager_.get(); 173 return surface_manager_.get();
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 250
254 base::ObserverList<ServerWindowObserver> observers_; 251 base::ObserverList<ServerWindowObserver> observers_;
255 252
256 DISALLOW_COPY_AND_ASSIGN(ServerWindow); 253 DISALLOW_COPY_AND_ASSIGN(ServerWindow);
257 }; 254 };
258 255
259 } // namespace ws 256 } // namespace ws
260 } // namespace ui 257 } // namespace ui
261 258
262 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ 259 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698