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

Side by Side Diff: ui/aura/window.cc

Issue 2733303004: Removes WmShell::NewWindow() (Closed)
Patch Set: merge and feedback Created 3 years, 9 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
« no previous file with comments | « ui/aura/window.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/aura/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 28 matching lines...) Expand all
39 #include "ui/compositor/layer.h" 39 #include "ui/compositor/layer.h"
40 #include "ui/display/display.h" 40 #include "ui/display/display.h"
41 #include "ui/display/screen.h" 41 #include "ui/display/screen.h"
42 #include "ui/events/event_target_iterator.h" 42 #include "ui/events/event_target_iterator.h"
43 #include "ui/gfx/canvas.h" 43 #include "ui/gfx/canvas.h"
44 #include "ui/gfx/path.h" 44 #include "ui/gfx/path.h"
45 #include "ui/gfx/scoped_canvas.h" 45 #include "ui/gfx/scoped_canvas.h"
46 46
47 namespace aura { 47 namespace aura {
48 48
49 Window::Window(WindowDelegate* delegate) : Window(delegate, nullptr) {} 49 Window::Window(WindowDelegate* delegate, ui::wm::WindowType type)
50 : Window(delegate, nullptr, type) {}
50 51
51 Window::Window(WindowDelegate* delegate, std::unique_ptr<WindowPort> port) 52 Window::Window(WindowDelegate* delegate,
53 std::unique_ptr<WindowPort> port,
54 ui::wm::WindowType type)
52 : port_owner_(std::move(port)), 55 : port_owner_(std::move(port)),
53 port_(port_owner_.get()), 56 port_(port_owner_.get()),
54 host_(nullptr), 57 host_(nullptr),
55 type_(ui::wm::WINDOW_TYPE_UNKNOWN), 58 type_(type),
56 owned_by_parent_(true), 59 owned_by_parent_(true),
57 delegate_(delegate), 60 delegate_(delegate),
58 parent_(nullptr), 61 parent_(nullptr),
59 visible_(false), 62 visible_(false),
60 id_(kInitialId), 63 id_(kInitialId),
61 transparent_(false), 64 transparent_(false),
62 ignore_events_(false), 65 ignore_events_(false),
63 // Don't notify newly added observers during notification. This causes 66 // Don't notify newly added observers during notification. This causes
64 // problems for code that adds an observer as part of an observer 67 // problems for code that adds an observer as part of an observer
65 // notification (such as the workspace code). 68 // notification (such as the workspace code).
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 layer_name = "Unnamed Window"; 1085 layer_name = "Unnamed Window";
1083 1086
1084 if (id_ != -1) 1087 if (id_ != -1)
1085 layer_name += " " + base::IntToString(id_); 1088 layer_name += " " + base::IntToString(id_);
1086 1089
1087 layer()->set_name(layer_name); 1090 layer()->set_name(layer_name);
1088 #endif 1091 #endif
1089 } 1092 }
1090 1093
1091 } // namespace aura 1094 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698