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

Side by Side Diff: ash/mus/root_window_controller.cc

Issue 2612113002: Removing ServerWindowCompositorFrameSinkManager::ShouldDraw() (Closed)
Patch Set: Created 3 years, 11 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 | services/ui/public/interfaces/mus_constants.mojom » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/mus/root_window_controller.h" 5 #include "ash/mus/root_window_controller.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 else 128 else
129 context = root(); 129 context = root();
130 130
131 gfx::Rect bounds = CalculateDefaultBounds(container_window, properties); 131 gfx::Rect bounds = CalculateDefaultBounds(container_window, properties);
132 window_count_++; 132 window_count_++;
133 133
134 const bool provide_non_client_frame = 134 const bool provide_non_client_frame =
135 window_type == ui::mojom::WindowType::WINDOW || 135 window_type == ui::mojom::WindowType::WINDOW ||
136 window_type == ui::mojom::WindowType::PANEL; 136 window_type == ui::mojom::WindowType::PANEL;
137 if (provide_non_client_frame) { 137 if (provide_non_client_frame) {
138 (*properties)[ui::mojom::kWaitForUnderlay_Property].clear();
139 // See NonClientFrameController for details on lifetime. 138 // See NonClientFrameController for details on lifetime.
140 NonClientFrameController* non_client_frame_controller = 139 NonClientFrameController* non_client_frame_controller =
141 new NonClientFrameController(container_window, context, bounds, 140 new NonClientFrameController(container_window, context, bounds,
142 window_type, properties, window_manager_); 141 window_type, properties, window_manager_);
143 return non_client_frame_controller->window(); 142 return non_client_frame_controller->window();
144 } 143 }
145 144
146 aura::Window* window = new aura::Window(nullptr); 145 aura::Window* window = new aura::Window(nullptr);
147 aura::SetWindowType(window, window_type); 146 aura::SetWindowType(window, window_type);
148 // Apply properties before Init(), that way they are sent to the server at 147 // Apply properties before Init(), that way they are sent to the server at
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } else { 230 } else {
232 width = root()->bounds().width() - 240; 231 width = root()->bounds().width() - 240;
233 height = root()->bounds().height() - 240; 232 height = root()->bounds().height() - 240;
234 } 233 }
235 return gfx::Rect(40 + (window_count_ % 4) * 40, 40 + (window_count_ % 4) * 40, 234 return gfx::Rect(40 + (window_count_ % 4) * 40, 40 + (window_count_ % 4) * 40,
236 width, height); 235 width, height);
237 } 236 }
238 237
239 } // namespace mus 238 } // namespace mus
240 } // namespace ash 239 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | services/ui/public/interfaces/mus_constants.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698