| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 else | 809 else |
| 810 NOTREACHED(); | 810 NOTREACHED(); |
| 811 } | 811 } |
| 812 | 812 |
| 813 void ChromeLauncherController::SetLaunchType( | 813 void ChromeLauncherController::SetLaunchType( |
| 814 ash::LauncherID id, | 814 ash::LauncherID id, |
| 815 extensions::LaunchType launch_type) { | 815 extensions::LaunchType launch_type) { |
| 816 if (!HasItemController(id)) | 816 if (!HasItemController(id)) |
| 817 return; | 817 return; |
| 818 | 818 |
| 819 extensions::SetLaunchType(profile_->GetExtensionService()->extension_prefs(), | 819 extensions::SetLaunchType(profile_->GetExtensionService(), |
| 820 id_to_item_controller_map_[id]->app_id(), | 820 id_to_item_controller_map_[id]->app_id(), |
| 821 launch_type); | 821 launch_type); |
| 822 } | 822 } |
| 823 | 823 |
| 824 void ChromeLauncherController::UnpinAppWithID(const std::string& app_id) { | 824 void ChromeLauncherController::UnpinAppWithID(const std::string& app_id) { |
| 825 if (CanPin()) | 825 if (CanPin()) |
| 826 DoUnpinAppWithID(app_id); | 826 DoUnpinAppWithID(app_id); |
| 827 else | 827 else |
| 828 NOTREACHED(); | 828 NOTREACHED(); |
| 829 } | 829 } |
| (...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2022 } | 2022 } |
| 2023 | 2023 |
| 2024 void ChromeLauncherController::ReleaseProfile() { | 2024 void ChromeLauncherController::ReleaseProfile() { |
| 2025 if (app_sync_ui_state_) | 2025 if (app_sync_ui_state_) |
| 2026 app_sync_ui_state_->RemoveObserver(this); | 2026 app_sync_ui_state_->RemoveObserver(this); |
| 2027 | 2027 |
| 2028 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); | 2028 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); |
| 2029 | 2029 |
| 2030 pref_change_registrar_.RemoveAll(); | 2030 pref_change_registrar_.RemoveAll(); |
| 2031 } | 2031 } |
| OLD | NEW |