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/app_list/recommended_apps.h" | 5 #include "chrome/browser/ui/app_list/recommended_apps.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 const bool changed = apps_.size() != new_recommends.size() || | 92 const bool changed = apps_.size() != new_recommends.size() || |
93 !std::equal(apps_.begin(), apps_.end(), new_recommends.begin()); | 93 !std::equal(apps_.begin(), apps_.end(), new_recommends.begin()); |
94 if (changed) { | 94 if (changed) { |
95 apps_.swap(new_recommends); | 95 apps_.swap(new_recommends); |
96 FOR_EACH_OBSERVER( | 96 FOR_EACH_OBSERVER( |
97 RecommendedAppsObserver, observers_, OnRecommendedAppsChanged()); | 97 RecommendedAppsObserver, observers_, OnRecommendedAppsChanged()); |
98 } | 98 } |
99 } | 99 } |
100 | 100 |
101 void RecommendedApps::OnBeginExtensionInstall( | |
102 const ExtensionInstallParams& params) {} | |
103 | |
104 void RecommendedApps::OnDownloadProgress(const std::string& extension_id, | |
105 int percent_downloaded) {} | |
106 | |
107 void RecommendedApps::OnInstallFailure(const std::string& extension_id) {} | |
108 | |
109 void RecommendedApps::OnExtensionInstalled( | 101 void RecommendedApps::OnExtensionInstalled( |
110 const extensions::Extension* extension) { | 102 const extensions::Extension* extension) { |
111 Update(); | 103 Update(); |
112 } | 104 } |
113 | 105 |
114 void RecommendedApps::OnExtensionLoaded( | 106 void RecommendedApps::OnExtensionLoaded( |
115 const extensions::Extension* extension) { | 107 const extensions::Extension* extension) { |
116 Update(); | 108 Update(); |
117 } | 109 } |
118 | 110 |
119 void RecommendedApps::OnExtensionUnloaded( | 111 void RecommendedApps::OnExtensionUnloaded( |
120 const extensions::Extension* extension) { | 112 const extensions::Extension* extension) { |
121 Update(); | 113 Update(); |
122 } | 114 } |
123 | 115 |
124 void RecommendedApps::OnExtensionUninstalled( | 116 void RecommendedApps::OnExtensionUninstalled( |
125 const extensions::Extension* extension) { | 117 const extensions::Extension* extension) { |
126 Update(); | 118 Update(); |
127 } | 119 } |
128 | 120 |
129 void RecommendedApps::OnAppsReordered() {} | |
130 | |
131 void RecommendedApps::OnAppInstalledToAppList( | |
132 const std::string& extension_id) {} | |
133 | |
134 void RecommendedApps::OnShutdown() {} | |
135 | |
136 } // namespace app_list | 121 } // namespace app_list |
OLD | NEW |