| 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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 else | 812 else |
| 813 NOTREACHED(); | 813 NOTREACHED(); |
| 814 } | 814 } |
| 815 | 815 |
| 816 void ChromeLauncherController::SetLaunchType( | 816 void ChromeLauncherController::SetLaunchType( |
| 817 ash::LauncherID id, | 817 ash::LauncherID id, |
| 818 extensions::LaunchType launch_type) { | 818 extensions::LaunchType launch_type) { |
| 819 if (!HasItemController(id)) | 819 if (!HasItemController(id)) |
| 820 return; | 820 return; |
| 821 | 821 |
| 822 extensions::SetLaunchType(profile_->GetExtensionService()->extension_prefs(), | 822 extensions::SetLaunchType(profile_->GetExtensionService(), |
| 823 id_to_item_controller_map_[id]->app_id(), | 823 id_to_item_controller_map_[id]->app_id(), |
| 824 launch_type); | 824 launch_type); |
| 825 } | 825 } |
| 826 | 826 |
| 827 void ChromeLauncherController::UnpinAppWithID(const std::string& app_id) { | 827 void ChromeLauncherController::UnpinAppWithID(const std::string& app_id) { |
| 828 if (CanPin()) | 828 if (CanPin()) |
| 829 DoUnpinAppWithID(app_id); | 829 DoUnpinAppWithID(app_id); |
| 830 else | 830 else |
| 831 NOTREACHED(); | 831 NOTREACHED(); |
| 832 } | 832 } |
| (...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2025 } | 2025 } |
| 2026 | 2026 |
| 2027 void ChromeLauncherController::ReleaseProfile() { | 2027 void ChromeLauncherController::ReleaseProfile() { |
| 2028 if (app_sync_ui_state_) | 2028 if (app_sync_ui_state_) |
| 2029 app_sync_ui_state_->RemoveObserver(this); | 2029 app_sync_ui_state_->RemoveObserver(this); |
| 2030 | 2030 |
| 2031 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); | 2031 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); |
| 2032 | 2032 |
| 2033 pref_change_registrar_.RemoveAll(); | 2033 pref_change_registrar_.RemoveAll(); |
| 2034 } | 2034 } |
| OLD | NEW |