| 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 "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "chrome/browser/extensions/extension_app_icon_loader.h" | 8 #include "chrome/browser/extensions/extension_app_icon_loader.h" |
| 9 #include "chrome/browser/profiles/profile_manager.h" | 9 #include "chrome/browser/profiles/profile_manager.h" |
| 10 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h" | 10 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // TODO(skuhne): The AppIconLoaderImpl has the same problem. Each loaded | 132 // TODO(skuhne): The AppIconLoaderImpl has the same problem. Each loaded |
| 133 // image is associated with a profile (its loader requires the profile). | 133 // image is associated with a profile (its loader requires the profile). |
| 134 // Since icon size changes are possible, the icon could be requested to be | 134 // Since icon size changes are possible, the icon could be requested to be |
| 135 // reloaded. However - having it not multi profile aware would cause problems | 135 // reloaded. However - having it not multi profile aware would cause problems |
| 136 // if the icon cache gets deleted upon user switch. | 136 // if the icon cache gets deleted upon user switch. |
| 137 std::unique_ptr<AppIconLoader> extension_app_icon_loader = | 137 std::unique_ptr<AppIconLoader> extension_app_icon_loader = |
| 138 base::MakeUnique<extensions::ExtensionAppIconLoader>( | 138 base::MakeUnique<extensions::ExtensionAppIconLoader>( |
| 139 profile_, extension_misc::EXTENSION_ICON_SMALL, this); | 139 profile_, extension_misc::EXTENSION_ICON_SMALL, this); |
| 140 app_icon_loaders_.push_back(std::move(extension_app_icon_loader)); | 140 app_icon_loaders_.push_back(std::move(extension_app_icon_loader)); |
| 141 | 141 |
| 142 if (arc::ArcAuthService::IsAllowedForProfile(profile_)) { | 142 if (arc::ArcSessionManager::IsAllowedForProfile(profile_)) { |
| 143 std::unique_ptr<AppIconLoader> arc_app_icon_loader = | 143 std::unique_ptr<AppIconLoader> arc_app_icon_loader = |
| 144 base::MakeUnique<ArcAppIconLoader>( | 144 base::MakeUnique<ArcAppIconLoader>( |
| 145 profile_, extension_misc::EXTENSION_ICON_SMALL, this); | 145 profile_, extension_misc::EXTENSION_ICON_SMALL, this); |
| 146 app_icon_loaders_.push_back(std::move(arc_app_icon_loader)); | 146 app_icon_loaders_.push_back(std::move(arc_app_icon_loader)); |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 | 149 |
| 150 void ChromeLauncherController::OnShelfCreated(int64_t display_id) { | 150 void ChromeLauncherController::OnShelfCreated(int64_t display_id) { |
| 151 if (!ConnectToShelfController()) | 151 if (!ConnectToShelfController()) |
| 152 return; | 152 return; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 178 // TODO(msw): Avoid handling this pref change and forwarding the value to ash. | 178 // TODO(msw): Avoid handling this pref change and forwarding the value to ash. |
| 179 ash::launcher::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), display_id, | 179 ash::launcher::SetShelfAutoHideBehaviorPref(profile_->GetPrefs(), display_id, |
| 180 auto_hide); | 180 auto_hide); |
| 181 } | 181 } |
| 182 | 182 |
| 183 void ChromeLauncherController::OnAppImageUpdated(const std::string& app_id, | 183 void ChromeLauncherController::OnAppImageUpdated(const std::string& app_id, |
| 184 const gfx::ImageSkia& image) { | 184 const gfx::ImageSkia& image) { |
| 185 // Implemented by subclasses; this should not be called. | 185 // Implemented by subclasses; this should not be called. |
| 186 NOTREACHED(); | 186 NOTREACHED(); |
| 187 } | 187 } |
| OLD | NEW |