OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |