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 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2015 } | 2015 } |
2016 | 2016 |
2017 void ChromeLauncherController::ReleaseProfile() { | 2017 void ChromeLauncherController::ReleaseProfile() { |
2018 if (app_sync_ui_state_) | 2018 if (app_sync_ui_state_) |
2019 app_sync_ui_state_->RemoveObserver(this); | 2019 app_sync_ui_state_->RemoveObserver(this); |
2020 | 2020 |
2021 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); | 2021 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); |
2022 | 2022 |
2023 pref_change_registrar_.RemoveAll(); | 2023 pref_change_registrar_.RemoveAll(); |
2024 } | 2024 } |
OLD | NEW |