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

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

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/server_window.h ('k') | components/mus/ws/window_tree_apptest.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 #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/common/transient_window_utils.h" 10 #include "components/mus/common/transient_window_utils.h"
11 #include "components/mus/ws/server_window_delegate.h" 11 #include "components/mus/ws/server_window_delegate.h"
12 #include "components/mus/ws/server_window_observer.h" 12 #include "components/mus/ws/server_window_observer.h"
13 #include "components/mus/ws/server_window_surface_manager.h" 13 #include "components/mus/ws/server_window_surface_manager.h"
14 #include "mojo/converters/geometry/geometry_type_converters.h" 14 #include "mojo/converters/geometry/geometry_type_converters.h"
15 15
16 namespace mus { 16 namespace mus {
17 17
18 namespace ws { 18 namespace ws {
19 19
20 ServerWindow::ServerWindow(ServerWindowDelegate* delegate, const WindowId& id) 20 ServerWindow::ServerWindow(ServerWindowDelegate* delegate, const WindowId& id)
21 : ServerWindow(delegate, id, Properties()) {}
22
23 ServerWindow::ServerWindow(ServerWindowDelegate* delegate,
24 const WindowId& id,
25 const Properties& properties)
21 : delegate_(delegate), 26 : delegate_(delegate),
22 id_(id), 27 id_(id),
23 parent_(nullptr), 28 parent_(nullptr),
24 stacking_target_(nullptr), 29 stacking_target_(nullptr),
25 transient_parent_(nullptr), 30 transient_parent_(nullptr),
26 visible_(false), 31 visible_(false),
27 opacity_(1), 32 opacity_(1),
28 can_focus_(true), 33 can_focus_(true),
34 properties_(properties),
29 // Don't notify newly added observers during notification. This causes 35 // Don't notify newly added observers during notification. This causes
30 // problems for code that adds an observer as part of an observer 36 // problems for code that adds an observer as part of an observer
31 // notification (such as ServerWindowDrawTracker). 37 // notification (such as ServerWindowDrawTracker).
32 observers_( 38 observers_(
33 base::ObserverList<ServerWindowObserver>::NOTIFY_EXISTING_ONLY) { 39 base::ObserverList<ServerWindowObserver>::NOTIFY_EXISTING_ONLY) {
34 DCHECK(delegate); // Must provide a delegate. 40 DCHECK(delegate); // Must provide a delegate.
35 } 41 }
36 42
37 ServerWindow::~ServerWindow() { 43 ServerWindow::~ServerWindow() {
38 FOR_EACH_OBSERVER(ServerWindowObserver, observers_, 44 FOR_EACH_OBSERVER(ServerWindowObserver, observers_,
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 } 398 }
393 399
394 // static 400 // static
395 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { 401 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) {
396 return &window->stacking_target_; 402 return &window->stacking_target_;
397 } 403 }
398 404
399 } // namespace ws 405 } // namespace ws
400 406
401 } // namespace mus 407 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/server_window.h ('k') | components/mus/ws/window_tree_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698