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

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

Issue 1414943003: Moves move logic into WM instead of WS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile 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/server_window.h ('k') | components/mus/ws/window_tree_host_impl.h » ('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 #include "components/mus/ws/server_window.h" 5 #include "components/mus/ws/server_window.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "components/mus/ws/server_window_delegate.h" 10 #include "components/mus/ws/server_window_delegate.h"
11 #include "components/mus/ws/server_window_observer.h" 11 #include "components/mus/ws/server_window_observer.h"
12 #include "mojo/converters/geometry/geometry_type_converters.h" 12 #include "mojo/converters/geometry/geometry_type_converters.h"
13 13
14 namespace mus { 14 namespace mus {
15 15
16 namespace ws { 16 namespace ws {
17 17
18 ServerWindow::ServerWindow(ServerWindowDelegate* delegate, const WindowId& id) 18 ServerWindow::ServerWindow(ServerWindowDelegate* delegate, const WindowId& id)
19 : delegate_(delegate), 19 : delegate_(delegate),
20 id_(id), 20 id_(id),
21 parent_(nullptr), 21 parent_(nullptr),
22 visible_(false), 22 visible_(false),
23 opacity_(1), 23 opacity_(1),
24 is_draggable_window_container_(false),
25 // Don't notify newly added observers during notification. This causes 24 // Don't notify newly added observers during notification. This causes
26 // problems for code that adds an observer as part of an observer 25 // problems for code that adds an observer as part of an observer
27 // notification (such as ServerWindowDrawTracker). 26 // notification (such as ServerWindowDrawTracker).
28 observers_( 27 observers_(
29 base::ObserverList<ServerWindowObserver>::NOTIFY_EXISTING_ONLY) { 28 base::ObserverList<ServerWindowObserver>::NOTIFY_EXISTING_ONLY) {
30 DCHECK(delegate); // Must provide a delegate. 29 DCHECK(delegate); // Must provide a delegate.
31 } 30 }
32 31
33 ServerWindow::~ServerWindow() { 32 ServerWindow::~ServerWindow() {
34 FOR_EACH_OBSERVER(ServerWindowObserver, observers_, 33 FOR_EACH_OBSERVER(ServerWindowObserver, observers_,
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 #endif 274 #endif
276 275
277 void ServerWindow::RemoveImpl(ServerWindow* window) { 276 void ServerWindow::RemoveImpl(ServerWindow* window) {
278 window->parent_ = NULL; 277 window->parent_ = NULL;
279 children_.erase(std::find(children_.begin(), children_.end(), window)); 278 children_.erase(std::find(children_.begin(), children_.end(), window));
280 } 279 }
281 280
282 } // namespace ws 281 } // namespace ws
283 282
284 } // namespace mus 283 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/server_window.h ('k') | components/mus/ws/window_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698