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

Side by Side Diff: components/mus/ws/window_tree_host_impl.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, 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/window_tree_apptest.cc ('k') | components/mus/ws/window_tree_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 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/mus/ws/window_tree_host_impl.h" 5 #include "components/mus/ws/window_tree_host_impl.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "components/mus/common/types.h" 8 #include "components/mus/common/types.h"
9 #include "components/mus/ws/connection_manager.h" 9 #include "components/mus/ws/connection_manager.h"
10 #include "components/mus/ws/display_manager.h" 10 #include "components/mus/ws/display_manager.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 void WindowTreeHostImpl::OnDisplayClosed() { 157 void WindowTreeHostImpl::OnDisplayClosed() {
158 if (delegate_) 158 if (delegate_)
159 delegate_->OnDisplayClosed(); 159 delegate_->OnDisplayClosed();
160 } 160 }
161 161
162 void WindowTreeHostImpl::OnViewportMetricsChanged( 162 void WindowTreeHostImpl::OnViewportMetricsChanged(
163 const mojom::ViewportMetrics& old_metrics, 163 const mojom::ViewportMetrics& old_metrics,
164 const mojom::ViewportMetrics& new_metrics) { 164 const mojom::ViewportMetrics& new_metrics) {
165 if (!root_) { 165 if (!root_) {
166 root_.reset(connection_manager_->CreateServerWindow( 166 root_.reset(connection_manager_->CreateServerWindow(
167 RootWindowId(connection_manager_->GetAndAdvanceNextHostId()))); 167 RootWindowId(connection_manager_->GetAndAdvanceNextHostId()),
168 ServerWindow::Properties()));
168 root_->SetBounds(gfx::Rect(new_metrics.size_in_pixels.To<gfx::Size>())); 169 root_->SetBounds(gfx::Rect(new_metrics.size_in_pixels.To<gfx::Size>()));
169 root_->SetVisible(true); 170 root_->SetVisible(true);
170 if (delegate_) 171 if (delegate_)
171 delegate_->OnDisplayInitialized(); 172 delegate_->OnDisplayInitialized();
172 event_dispatcher_.set_root(root_.get()); 173 event_dispatcher_.set_root(root_.get());
173 } else { 174 } else {
174 root_->SetBounds(gfx::Rect(new_metrics.size_in_pixels.To<gfx::Size>())); 175 root_->SetBounds(gfx::Rect(new_metrics.size_in_pixels.To<gfx::Size>()));
175 } 176 }
176 connection_manager_->ProcessViewportMetricsChanged(old_metrics, new_metrics); 177 connection_manager_->ProcessViewportMetricsChanged(old_metrics, new_metrics);
177 } 178 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 base::Bind(&base::DoNothing)); 287 base::Bind(&base::DoNothing));
287 } 288 }
288 289
289 void WindowTreeHostImpl::OnWindowDestroyed(ServerWindow* window) { 290 void WindowTreeHostImpl::OnWindowDestroyed(ServerWindow* window) {
290 windows_needing_frame_destruction_.erase(window); 291 windows_needing_frame_destruction_.erase(window);
291 window->RemoveObserver(this); 292 window->RemoveObserver(this);
292 } 293 }
293 294
294 } // namespace ws 295 } // namespace ws
295 } // namespace mus 296 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/window_tree_apptest.cc ('k') | components/mus/ws/window_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698