OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_launcher_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 shelf->SetAutoHideBehavior(ash::GetShelfAutoHideBehaviorPref(prefs, display)); | 1022 shelf->SetAutoHideBehavior(ash::GetShelfAutoHideBehaviorPref(prefs, display)); |
1023 | 1023 |
1024 if (ash::ShelfWidget::ShelfAlignmentAllowed()) | 1024 if (ash::ShelfWidget::ShelfAlignmentAllowed()) |
1025 shelf->SetAlignment(ash::GetShelfAlignmentPref(prefs, display)); | 1025 shelf->SetAlignment(ash::GetShelfAlignmentPref(prefs, display)); |
1026 } | 1026 } |
1027 | 1027 |
1028 void ChromeLauncherController::OnShelfDestroyed(ash::Shelf* shelf) {} | 1028 void ChromeLauncherController::OnShelfDestroyed(ash::Shelf* shelf) {} |
1029 | 1029 |
1030 void ChromeLauncherController::OnShelfAlignmentChanged(ash::Shelf* shelf) { | 1030 void ChromeLauncherController::OnShelfAlignmentChanged(ash::Shelf* shelf) { |
1031 ash::SetShelfAlignmentPref(profile_->GetPrefs(), GetDisplayIDForShelf(shelf), | 1031 ash::SetShelfAlignmentPref(profile_->GetPrefs(), GetDisplayIDForShelf(shelf), |
1032 shelf->GetAlignment()); | 1032 shelf->alignment()); |
1033 } | 1033 } |
1034 | 1034 |
1035 void ChromeLauncherController::OnShelfAutoHideBehaviorChanged( | 1035 void ChromeLauncherController::OnShelfAutoHideBehaviorChanged( |
1036 ash::Shelf* shelf) { | 1036 ash::Shelf* shelf) { |
1037 ash::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), | 1037 ash::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), |
1038 GetDisplayIDForShelf(shelf), | 1038 GetDisplayIDForShelf(shelf), |
1039 shelf->auto_hide_behavior()); | 1039 shelf->auto_hide_behavior()); |
1040 } | 1040 } |
1041 | 1041 |
1042 void ChromeLauncherController::ShelfItemAdded(int index) { | 1042 void ChromeLauncherController::ShelfItemAdded(int index) { |
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2063 | 2063 |
2064 AppIconLoader* ChromeLauncherController::GetAppIconLoaderForApp( | 2064 AppIconLoader* ChromeLauncherController::GetAppIconLoaderForApp( |
2065 const std::string& app_id) { | 2065 const std::string& app_id) { |
2066 for (const auto& app_icon_loader : app_icon_loaders_) { | 2066 for (const auto& app_icon_loader : app_icon_loaders_) { |
2067 if (app_icon_loader->CanLoadImageForApp(app_id)) | 2067 if (app_icon_loader->CanLoadImageForApp(app_id)) |
2068 return app_icon_loader.get(); | 2068 return app_icon_loader.get(); |
2069 } | 2069 } |
2070 | 2070 |
2071 return nullptr; | 2071 return nullptr; |
2072 } | 2072 } |
OLD | NEW |