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

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

Issue 2410633002: Moves PanelFrameView to common (Closed)
Patch Set: Created 4 years, 2 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/non_client_frame_controller.cc ('k') | ash/shell/panel_window.cc » ('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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 wm_root_window_controller_->ResetRootForNewWindowsIfNecessary(); 83 wm_root_window_controller_->ResetRootForNewWindowsIfNecessary();
84 wm_root_window_controller_->CloseChildWindows(); 84 wm_root_window_controller_->CloseChildWindows();
85 } 85 }
86 86
87 shell::Connector* RootWindowController::GetConnector() { 87 shell::Connector* RootWindowController::GetConnector() {
88 return window_manager_->connector(); 88 return window_manager_->connector();
89 } 89 }
90 90
91 ui::Window* RootWindowController::NewTopLevelWindow( 91 ui::Window* RootWindowController::NewTopLevelWindow(
92 std::map<std::string, std::vector<uint8_t>>* properties) { 92 std::map<std::string, std::vector<uint8_t>>* properties) {
93 // TODO(sky): panels need a different frame, http:://crbug.com/614362.
94 const bool provide_non_client_frame = 93 const bool provide_non_client_frame =
95 GetWindowType(*properties) == ui::mojom::WindowType::WINDOW || 94 GetWindowType(*properties) == ui::mojom::WindowType::WINDOW ||
96 GetWindowType(*properties) == ui::mojom::WindowType::PANEL; 95 GetWindowType(*properties) == ui::mojom::WindowType::PANEL;
97 if (provide_non_client_frame) 96 if (provide_non_client_frame)
98 (*properties)[ui::mojom::kWaitForUnderlay_Property].clear(); 97 (*properties)[ui::mojom::kWaitForUnderlay_Property].clear();
99 98
100 // TODO(sky): constrain and validate properties before passing to server. 99 // TODO(sky): constrain and validate properties before passing to server.
101 ui::Window* window = root_->window_tree()->NewWindow(properties); 100 ui::Window* window = root_->window_tree()->NewWindow(properties);
102 window->SetBounds(CalculateDefaultBounds(window)); 101 window->SetBounds(CalculateDefaultBounds(window));
103 102
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 GetWindowByShellWindowId(kShellWindowId_LockScreenContainer); 183 GetWindowByShellWindowId(kShellWindowId_LockScreenContainer);
185 layout_managers_[lock_screen_container->mus_window()].reset( 184 layout_managers_[lock_screen_container->mus_window()].reset(
186 new ScreenlockLayout(lock_screen_container->mus_window())); 185 new ScreenlockLayout(lock_screen_container->mus_window()));
187 186
188 // Creating the shelf also creates the status area and both layout managers. 187 // Creating the shelf also creates the status area and both layout managers.
189 wm_shelf_.reset(new WmShelfMus(wm_root_window_controller_->GetWindow())); 188 wm_shelf_.reset(new WmShelfMus(wm_root_window_controller_->GetWindow()));
190 } 189 }
191 190
192 } // namespace mus 191 } // namespace mus
193 } // namespace ash 192 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/non_client_frame_controller.cc ('k') | ash/shell/panel_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698