| 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/extensions/extension_app_icon_loader.h" | 7 #include "chrome/browser/extensions/extension_app_icon_loader.h" |
| 8 #include "chrome/browser/profiles/profile_manager.h" | 8 #include "chrome/browser/profiles/profile_manager.h" |
| 9 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h" | 9 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h" |
| 10 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" | 10 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 150 } |
| 151 | 151 |
| 152 return nullptr; | 152 return nullptr; |
| 153 } | 153 } |
| 154 | 154 |
| 155 void ChromeMashShelfController::OnAlignmentChanged( | 155 void ChromeMashShelfController::OnAlignmentChanged( |
| 156 mash::shelf::mojom::Alignment alignment) { | 156 mash::shelf::mojom::Alignment alignment) { |
| 157 ash::SetShelfAlignmentPref( | 157 ash::SetShelfAlignmentPref( |
| 158 ProfileManager::GetActiveUserProfile()->GetPrefs(), | 158 ProfileManager::GetActiveUserProfile()->GetPrefs(), |
| 159 display::Screen::GetScreen()->GetPrimaryDisplay().id(), | 159 display::Screen::GetScreen()->GetPrimaryDisplay().id(), |
| 160 static_cast<ash::wm::ShelfAlignment>(alignment)); | 160 static_cast<ash::ShelfAlignment>(alignment)); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void ChromeMashShelfController::OnAutoHideBehaviorChanged( | 163 void ChromeMashShelfController::OnAutoHideBehaviorChanged( |
| 164 mash::shelf::mojom::AutoHideBehavior auto_hide) { | 164 mash::shelf::mojom::AutoHideBehavior auto_hide) { |
| 165 ash::SetShelfAutoHideBehaviorPref( | 165 ash::SetShelfAutoHideBehaviorPref( |
| 166 ProfileManager::GetActiveUserProfile()->GetPrefs(), | 166 ProfileManager::GetActiveUserProfile()->GetPrefs(), |
| 167 display::Screen::GetScreen()->GetPrimaryDisplay().id(), | 167 display::Screen::GetScreen()->GetPrimaryDisplay().id(), |
| 168 static_cast<ash::ShelfAutoHideBehavior>(auto_hide)); | 168 static_cast<ash::ShelfAutoHideBehavior>(auto_hide)); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void ChromeMashShelfController::OnAppImageUpdated(const std::string& app_id, | 171 void ChromeMashShelfController::OnAppImageUpdated(const std::string& app_id, |
| 172 const gfx::ImageSkia& image) { | 172 const gfx::ImageSkia& image) { |
| 173 shelf_controller_->SetItemImage(app_id, *image.bitmap()); | 173 shelf_controller_->SetItemImage(app_id, *image.bitmap()); |
| 174 } | 174 } |
| OLD | NEW |