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

Side by Side Diff: components/exo/display.cc

Issue 2016883002: exo: Remote shell surfaces are not yet resizeable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/exo/display.h" 5 #include "components/exo/display.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/wm/common/wm_shell_window_ids.h" 10 #include "ash/wm/common/wm_shell_window_ids.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 int container) { 135 int container) {
136 TRACE_EVENT2("exo", "Display::CreateRemoteShellSurface", "surface", 136 TRACE_EVENT2("exo", "Display::CreateRemoteShellSurface", "surface",
137 surface->AsTracedValue(), "container", container); 137 surface->AsTracedValue(), "container", container);
138 138
139 if (surface->HasSurfaceDelegate()) { 139 if (surface->HasSurfaceDelegate()) {
140 DLOG(ERROR) << "Surface has already been assigned a role"; 140 DLOG(ERROR) << "Surface has already been assigned a role";
141 return nullptr; 141 return nullptr;
142 } 142 }
143 143
144 return base::WrapUnique(new ShellSurface(surface, nullptr, gfx::Rect(1, 1), 144 return base::WrapUnique(new ShellSurface(surface, nullptr, gfx::Rect(1, 1),
145 true, true, container)); 145 true, false, container));
Daniele Castagna 2016/05/26 21:08:37 nit: maybe you can name the parameters (with comme
146 } 146 }
147 147
148 std::unique_ptr<SubSurface> Display::CreateSubSurface(Surface* surface, 148 std::unique_ptr<SubSurface> Display::CreateSubSurface(Surface* surface,
149 Surface* parent) { 149 Surface* parent) {
150 TRACE_EVENT2("exo", "Display::CreateSubSurface", "surface", 150 TRACE_EVENT2("exo", "Display::CreateSubSurface", "surface",
151 surface->AsTracedValue(), "parent", parent->AsTracedValue()); 151 surface->AsTracedValue(), "parent", parent->AsTracedValue());
152 152
153 if (surface->Contains(parent)) { 153 if (surface->Contains(parent)) {
154 DLOG(ERROR) << "Parent is contained within surface's hierarchy"; 154 DLOG(ERROR) << "Parent is contained within surface's hierarchy";
155 return nullptr; 155 return nullptr;
156 } 156 }
157 157
158 if (surface->HasSurfaceDelegate()) { 158 if (surface->HasSurfaceDelegate()) {
159 DLOG(ERROR) << "Surface has already been assigned a role"; 159 DLOG(ERROR) << "Surface has already been assigned a role";
160 return nullptr; 160 return nullptr;
161 } 161 }
162 162
163 return base::WrapUnique(new SubSurface(surface, parent)); 163 return base::WrapUnique(new SubSurface(surface, parent));
164 } 164 }
165 165
166 } // namespace exo 166 } // namespace exo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698