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

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

Issue 2582823002: WIP: Surface Synchronization System
Patch Set: Only create ClientSurfaceEmbedder if window is visible. Trash it otherwise. 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 | cc/ipc/cc_param_traits_unittest.cc » ('j') | ui/aura/mus/window_tree_client.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/top_level_window_factory.h" 5 #include "ash/mus/top_level_window_factory.h"
6 6
7 #include "ash/common/wm/container_finder.h" 7 #include "ash/common/wm/container_finder.h"
8 #include "ash/common/wm/window_state.h" 8 #include "ash/common/wm/window_state.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/common/wm_window.h" 10 #include "ash/common/wm_window.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 aura::Window* window = new aura::Window(nullptr); 137 aura::Window* window = new aura::Window(nullptr);
138 aura::SetWindowType(window, window_type); 138 aura::SetWindowType(window, window_type);
139 // Apply properties before Init(), that way they are sent to the server at 139 // Apply properties before Init(), that way they are sent to the server at
140 // the time the window is created. 140 // the time the window is created.
141 aura::PropertyConverter* property_converter = 141 aura::PropertyConverter* property_converter =
142 window_manager->property_converter(); 142 window_manager->property_converter();
143 for (auto& property_pair : *properties) { 143 for (auto& property_pair : *properties) {
144 property_converter->SetPropertyFromTransportValue( 144 property_converter->SetPropertyFromTransportValue(
145 window, property_pair.first, &property_pair.second); 145 window, property_pair.first, &property_pair.second);
146 } 146 }
147 window->Init(ui::LAYER_TEXTURED); 147 window->Init(ui::LAYER_SURFACE);
148 window->SetBounds(bounds); 148 window->SetBounds(bounds);
149 149
150 if (container_window) { 150 if (container_window) {
151 container_window->AddChild(window); 151 container_window->AddChild(window);
152 } else { 152 } else {
153 WmWindow* root = root_window_controller->GetWindow(); 153 WmWindow* root = root_window_controller->GetWindow();
154 gfx::Point origin = 154 gfx::Point origin =
155 root->ConvertPointToTarget(root->GetRootWindow(), gfx::Point()); 155 root->ConvertPointToTarget(root->GetRootWindow(), gfx::Point());
156 origin += root_window_controller->GetWindow() 156 origin += root_window_controller->GetWindow()
157 ->GetDisplayNearestWindow() 157 ->GetDisplayNearestWindow()
(...skipping 26 matching lines...) Expand all
184 (*properties) 184 (*properties)
185 [ui::mojom::WindowManager::kWindowIgnoredByShelf_Property])); 185 [ui::mojom::WindowManager::kWindowIgnoredByShelf_Property]));
186 // No need to persist this value. 186 // No need to persist this value.
187 properties->erase(ui::mojom::WindowManager::kWindowIgnoredByShelf_Property); 187 properties->erase(ui::mojom::WindowManager::kWindowIgnoredByShelf_Property);
188 } 188 }
189 return window; 189 return window;
190 } 190 }
191 191
192 } // namespace mus 192 } // namespace mus
193 } // namespace ash 193 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | cc/ipc/cc_param_traits_unittest.cc » ('j') | ui/aura/mus/window_tree_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698