| 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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1157 switch (shelf->GetAlignment()) { | 1157 switch (shelf->GetAlignment()) { |
| 1158 case ash::SHELF_ALIGNMENT_BOTTOM: | 1158 case ash::SHELF_ALIGNMENT_BOTTOM: |
| 1159 value = ash::kShelfAlignmentBottom; | 1159 value = ash::kShelfAlignmentBottom; |
| 1160 break; | 1160 break; |
| 1161 case ash::SHELF_ALIGNMENT_LEFT: | 1161 case ash::SHELF_ALIGNMENT_LEFT: |
| 1162 value = ash::kShelfAlignmentLeft; | 1162 value = ash::kShelfAlignmentLeft; |
| 1163 break; | 1163 break; |
| 1164 case ash::SHELF_ALIGNMENT_RIGHT: | 1164 case ash::SHELF_ALIGNMENT_RIGHT: |
| 1165 value = ash::kShelfAlignmentRight; | 1165 value = ash::kShelfAlignmentRight; |
| 1166 break; | 1166 break; |
| 1167 case ash::SHELF_ALIGNMENT_BOTTOM_LOCKED: |
| 1168 // This should not be a valid preference option for now. We only want to |
| 1169 // lock the shelf during login or when adding a user. |
| 1170 return; |
| 1167 } | 1171 } |
| 1168 | 1172 |
| 1169 aura::Window* root_window = | 1173 aura::Window* root_window = |
| 1170 shelf->shelf_widget()->GetNativeWindow()->GetRootWindow(); | 1174 shelf->shelf_widget()->GetNativeWindow()->GetRootWindow(); |
| 1171 | 1175 |
| 1172 UpdatePerDisplayPref(profile_->GetPrefs(), root_window, | 1176 UpdatePerDisplayPref(profile_->GetPrefs(), root_window, |
| 1173 prefs::kShelfAlignment, value); | 1177 prefs::kShelfAlignment, value); |
| 1174 | 1178 |
| 1175 if (root_window == ash::Shell::GetPrimaryRootWindow()) { | 1179 if (root_window == ash::Shell::GetPrimaryRootWindow()) { |
| 1176 // See comment in |kShelfAlignment| about why we have two prefs here. | 1180 // See comment in |kShelfAlignment| about why we have two prefs here. |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2228 | 2232 |
| 2229 AppIconLoader* ChromeLauncherController::GetAppIconLoaderForApp( | 2233 AppIconLoader* ChromeLauncherController::GetAppIconLoaderForApp( |
| 2230 const std::string& app_id) { | 2234 const std::string& app_id) { |
| 2231 for (const auto& app_icon_loader : app_icon_loaders_) { | 2235 for (const auto& app_icon_loader : app_icon_loaders_) { |
| 2232 if (app_icon_loader->CanLoadImageForApp(app_id)) | 2236 if (app_icon_loader->CanLoadImageForApp(app_id)) |
| 2233 return app_icon_loader.get(); | 2237 return app_icon_loader.get(); |
| 2234 } | 2238 } |
| 2235 | 2239 |
| 2236 return nullptr; | 2240 return nullptr; |
| 2237 } | 2241 } |
| OLD | NEW |