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_impl.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 void ChromeLauncherControllerImpl::AttachProfile(Profile* profile_to_attach) { | 772 void ChromeLauncherControllerImpl::AttachProfile(Profile* profile_to_attach) { |
773 // The base class implementation updates the helper and app icon loaders. | 773 // The base class implementation updates the helper and app icon loaders. |
774 ChromeLauncherController::AttachProfile(profile_to_attach); | 774 ChromeLauncherController::AttachProfile(profile_to_attach); |
775 | 775 |
776 pref_change_registrar_.Init(profile()->GetPrefs()); | 776 pref_change_registrar_.Init(profile()->GetPrefs()); |
777 pref_change_registrar_.Add( | 777 pref_change_registrar_.Add( |
778 prefs::kPolicyPinnedLauncherApps, | 778 prefs::kPolicyPinnedLauncherApps, |
779 base::Bind(&ChromeLauncherControllerImpl::UpdateAppLaunchersFromPref, | 779 base::Bind(&ChromeLauncherControllerImpl::UpdateAppLaunchersFromPref, |
780 base::Unretained(this))); | 780 base::Unretained(this))); |
781 // Handling of prefs::kArcEnabled change should be called deferred to avoid | 781 // Handling of prefs::kArcEnabled change should be called deferred to avoid |
782 // race condition when OnAppUninstalledPrepared for Arc apps is called after | 782 // race condition when OnAppUninstalledPrepared for ARC apps is called after |
783 // UpdateAppLaunchersFromPref. | 783 // UpdateAppLaunchersFromPref. |
784 pref_change_registrar_.Add( | 784 pref_change_registrar_.Add( |
785 prefs::kArcEnabled, | 785 prefs::kArcEnabled, |
786 base::Bind( | 786 base::Bind( |
787 &ChromeLauncherControllerImpl::ScheduleUpdateAppLaunchersFromPref, | 787 &ChromeLauncherControllerImpl::ScheduleUpdateAppLaunchersFromPref, |
788 base::Unretained(this))); | 788 base::Unretained(this))); |
789 pref_change_registrar_.Add( | 789 pref_change_registrar_.Add( |
790 prefs::kShelfAlignmentLocal, | 790 prefs::kShelfAlignmentLocal, |
791 base::Bind(&ChromeLauncherController::SetShelfAlignmentFromPrefs, | 791 base::Bind(&ChromeLauncherController::SetShelfAlignmentFromPrefs, |
792 base::Unretained(this))); | 792 base::Unretained(this))); |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 LauncherItemController* controller = GetLauncherItemController(item.id); | 1492 LauncherItemController* controller = GetLauncherItemController(item.id); |
1493 if (!controller || controller->image_set_by_controller()) | 1493 if (!controller || controller->image_set_by_controller()) |
1494 continue; | 1494 continue; |
1495 item.image = image; | 1495 item.image = image; |
1496 if (arc_deferred_launcher_) | 1496 if (arc_deferred_launcher_) |
1497 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); | 1497 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); |
1498 model_->Set(index, item); | 1498 model_->Set(index, item); |
1499 // It's possible we're waiting on more than one item, so don't break. | 1499 // It's possible we're waiting on more than one item, so don't break. |
1500 } | 1500 } |
1501 } | 1501 } |
OLD | NEW |