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

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

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. Created 3 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 | « ash/mus/bridge/shell_port_mash.cc ('k') | ash/mus/window_manager.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 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 const int64_t display_id = GetInitialDisplayId(*properties); 65 const int64_t display_id = GetInitialDisplayId(*properties);
66 if (display_id != display::kInvalidDisplayId) { 66 if (display_id != display::kInvalidDisplayId) {
67 for (RootWindowController* root_window_controller : 67 for (RootWindowController* root_window_controller :
68 RootWindowController::root_window_controllers()) { 68 RootWindowController::root_window_controllers()) {
69 if (GetRootWindowSettings(root_window_controller->GetRootWindow()) 69 if (GetRootWindowSettings(root_window_controller->GetRootWindow())
70 ->display_id == display_id) { 70 ->display_id == display_id) {
71 return root_window_controller; 71 return root_window_controller;
72 } 72 }
73 } 73 }
74 } 74 }
75 return RootWindowController::ForWindow( 75 return GetRootWindowController(Shell::GetRootWindowForNewWindows());
76 Shell::GetWmRootWindowForNewWindows()->aura_window());
77 } 76 }
78 77
79 // Returns the bounds for the new window. 78 // Returns the bounds for the new window.
80 gfx::Rect CalculateDefaultBounds( 79 gfx::Rect CalculateDefaultBounds(
81 WindowManager* window_manager, 80 WindowManager* window_manager,
82 RootWindowController* root_window_controller, 81 RootWindowController* root_window_controller,
83 aura::Window* container_window, 82 aura::Window* container_window,
84 const std::map<std::string, std::vector<uint8_t>>* properties) { 83 const std::map<std::string, std::vector<uint8_t>>* properties) {
85 gfx::Rect requested_bounds; 84 gfx::Rect requested_bounds;
86 if (GetInitialBounds(*properties, &requested_bounds)) 85 if (GetInitialBounds(*properties, &requested_bounds))
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 if (non_client_frame_controller) 223 if (non_client_frame_controller)
225 non_client_frame_controller->set_can_activate(can_focus); 224 non_client_frame_controller->set_can_activate(can_focus);
226 // No need to persist this value. 225 // No need to persist this value.
227 properties->erase(focusable_iter); 226 properties->erase(focusable_iter);
228 } 227 }
229 return window; 228 return window;
230 } 229 }
231 230
232 } // namespace mus 231 } // namespace mus
233 } // namespace ash 232 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/shell_port_mash.cc ('k') | ash/mus/window_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698