| 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 "chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile_manager.h" | 7 #include "chrome/browser/profiles/profile_manager.h" |
| 8 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" | 8 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" |
| 9 #include "chrome/grit/theme_resources.h" | 9 #include "chrome/grit/theme_resources.h" |
| 10 #include "content/public/common/mojo_shell_connection.h" | 10 #include "content/public/common/mojo_shell_connection.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // Start observing the shelf now that it has been initialized. | 89 // Start observing the shelf now that it has been initialized. |
| 90 mash::shelf::mojom::ShelfObserverAssociatedPtrInfo ptr_info; | 90 mash::shelf::mojom::ShelfObserverAssociatedPtrInfo ptr_info; |
| 91 observer_binding_.Bind(&ptr_info, shelf_controller_.associated_group()); | 91 observer_binding_.Bind(&ptr_info, shelf_controller_.associated_group()); |
| 92 shelf_controller_->AddObserver(std::move(ptr_info)); | 92 shelf_controller_->AddObserver(std::move(ptr_info)); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void ChromeMashShelfController::OnAlignmentChanged( | 95 void ChromeMashShelfController::OnAlignmentChanged( |
| 96 mash::shelf::mojom::Alignment alignment) { | 96 mash::shelf::mojom::Alignment alignment) { |
| 97 ash::SetShelfAlignmentPref(ProfileManager::GetActiveUserProfile()->GetPrefs(), | 97 ash::SetShelfAlignmentPref(ProfileManager::GetActiveUserProfile()->GetPrefs(), |
| 98 gfx::Screen::GetScreen()->GetPrimaryDisplay().id(), | 98 gfx::Screen::GetScreen()->GetPrimaryDisplay().id(), |
| 99 static_cast<ash::ShelfAlignment>(alignment)); | 99 static_cast<ash::wm::ShelfAlignment>(alignment)); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void ChromeMashShelfController::OnAutoHideBehaviorChanged( | 102 void ChromeMashShelfController::OnAutoHideBehaviorChanged( |
| 103 mash::shelf::mojom::AutoHideBehavior auto_hide) { | 103 mash::shelf::mojom::AutoHideBehavior auto_hide) { |
| 104 ash::SetShelfAutoHideBehaviorPref( | 104 ash::SetShelfAutoHideBehaviorPref( |
| 105 ProfileManager::GetActiveUserProfile()->GetPrefs(), | 105 ProfileManager::GetActiveUserProfile()->GetPrefs(), |
| 106 gfx::Screen::GetScreen()->GetPrimaryDisplay().id(), | 106 gfx::Screen::GetScreen()->GetPrimaryDisplay().id(), |
| 107 static_cast<ash::ShelfAutoHideBehavior>(auto_hide)); | 107 static_cast<ash::ShelfAutoHideBehavior>(auto_hide)); |
| 108 } | 108 } |
| OLD | NEW |