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

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

Issue 2919523004: Surface synchronization: Don't gutter translucent windows (Closed)
Patch Set: Created 3 years, 6 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/window_manager.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 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/mus/disconnected_app_handler.h" 7 #include "ash/mus/disconnected_app_handler.h"
8 #include "ash/mus/frame/detached_title_area_renderer.h" 8 #include "ash/mus/frame/detached_title_area_renderer.h"
9 #include "ash/mus/non_client_frame_controller.h" 9 #include "ash/mus/non_client_frame_controller.h"
10 #include "ash/mus/property_util.h" 10 #include "ash/mus/property_util.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 if (focusable_iter != properties->end()) { 219 if (focusable_iter != properties->end()) {
220 bool can_focus = mojo::ConvertTo<bool>(focusable_iter->second); 220 bool can_focus = mojo::ConvertTo<bool>(focusable_iter->second);
221 window_manager->window_tree_client()->SetCanFocus(window, can_focus); 221 window_manager->window_tree_client()->SetCanFocus(window, can_focus);
222 NonClientFrameController* non_client_frame_controller = 222 NonClientFrameController* non_client_frame_controller =
223 NonClientFrameController::Get(window); 223 NonClientFrameController::Get(window);
224 if (non_client_frame_controller) 224 if (non_client_frame_controller)
225 non_client_frame_controller->set_can_activate(can_focus); 225 non_client_frame_controller->set_can_activate(can_focus);
226 // No need to persist this value. 226 // No need to persist this value.
227 properties->erase(focusable_iter); 227 properties->erase(focusable_iter);
228 } 228 }
229
230 auto translucent_iter =
231 properties->find(ui::mojom::WindowManager::kTranslucent_InitProperty);
232 if (translucent_iter != properties->end()) {
233 bool translucent = mojo::ConvertTo<bool>(translucent_iter->second);
234 window->SetTransparent(translucent);
235 // No need to persist this value.
236 properties->erase(translucent_iter);
237 }
238
229 return window; 239 return window;
230 } 240 }
231 241
232 } // namespace mus 242 } // namespace mus
233 } // namespace ash 243 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | services/ui/public/interfaces/window_manager.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698