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

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

Issue 1914093002: Refactors DockedWindowLayoutManager in terms of ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nuke_aura_window
Patch Set: comment Created 4 years, 8 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
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/shelf_delegate_mus.h" 5 #include "ash/mus/shelf_delegate_mus.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "ash/shelf/shelf.h" 9 #include "ash/shelf/shelf.h"
10 #include "ash/shelf/shelf_item_delegate.h" 10 #include "ash/shelf/shelf_item_delegate.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 Shelf* shelf = Shelf::ForPrimaryDisplay(); 251 Shelf* shelf = Shelf::ForPrimaryDisplay();
252 observer_ptr->OnAlignmentChanged( 252 observer_ptr->OnAlignmentChanged(
253 static_cast<mash::shelf::mojom::Alignment>(shelf->alignment())); 253 static_cast<mash::shelf::mojom::Alignment>(shelf->alignment()));
254 observer_ptr->OnAutoHideBehaviorChanged( 254 observer_ptr->OnAutoHideBehaviorChanged(
255 static_cast<mash::shelf::mojom::AutoHideBehavior>( 255 static_cast<mash::shelf::mojom::AutoHideBehavior>(
256 shelf->auto_hide_behavior())); 256 shelf->auto_hide_behavior()));
257 observers_.AddPtr(std::move(observer_ptr)); 257 observers_.AddPtr(std::move(observer_ptr));
258 } 258 }
259 259
260 void ShelfDelegateMus::SetAlignment(mash::shelf::mojom::Alignment alignment) { 260 void ShelfDelegateMus::SetAlignment(mash::shelf::mojom::Alignment alignment) {
261 ShelfAlignment value = static_cast<ShelfAlignment>(alignment); 261 wm::ShelfAlignment value = static_cast<wm::ShelfAlignment>(alignment);
262 Shell::GetInstance()->SetShelfAlignment(value, Shell::GetPrimaryRootWindow()); 262 Shell::GetInstance()->SetShelfAlignment(value, Shell::GetPrimaryRootWindow());
263 } 263 }
264 264
265 void ShelfDelegateMus::SetAutoHideBehavior( 265 void ShelfDelegateMus::SetAutoHideBehavior(
266 mash::shelf::mojom::AutoHideBehavior auto_hide) { 266 mash::shelf::mojom::AutoHideBehavior auto_hide) {
267 ShelfAutoHideBehavior value = static_cast<ShelfAutoHideBehavior>(auto_hide); 267 ShelfAutoHideBehavior value = static_cast<ShelfAutoHideBehavior>(auto_hide);
268 Shell::GetInstance()->SetShelfAutoHideBehavior(value, 268 Shell::GetInstance()->SetShelfAutoHideBehavior(value,
269 Shell::GetPrimaryRootWindow()); 269 Shell::GetPrimaryRootWindow());
270 } 270 }
271 271
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 StatusAreaWidget* status_widget = widget->status_area_widget(); 417 StatusAreaWidget* status_widget = widget->status_area_widget();
418 mus::Window* status_window = 418 mus::Window* status_window =
419 aura::GetMusWindow(status_widget->GetNativeWindow()); 419 aura::GetMusWindow(status_widget->GetNativeWindow());
420 gfx::Size status_size = status_widget->GetWindowBoundsInScreen().size(); 420 gfx::Size status_size = status_widget->GetWindowBoundsInScreen().size();
421 status_window->SetSharedProperty<gfx::Size>( 421 status_window->SetSharedProperty<gfx::Size>(
422 mus::mojom::WindowManager::kPreferredSize_Property, status_size); 422 mus::mojom::WindowManager::kPreferredSize_Property, status_size);
423 } 423 }
424 424
425 } // namespace sysui 425 } // namespace sysui
426 } // namespace ash 426 } // namespace ash
OLDNEW
« no previous file with comments | « ash/content/keyboard_overlay/keyboard_overlay_delegate_unittest.cc ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698