| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extension_app_model_builder.h" | 5 #include "chrome/browser/ui/app_list/extension_app_model_builder.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 if (should_display == does_display) | 76 if (should_display == does_display) |
| 77 continue; | 77 continue; |
| 78 | 78 |
| 79 if (should_display) { | 79 if (should_display) { |
| 80 InsertApp(CreateAppItem((*app)->id(), | 80 InsertApp(CreateAppItem((*app)->id(), |
| 81 "", | 81 "", |
| 82 gfx::ImageSkia(), | 82 gfx::ImageSkia(), |
| 83 (*app)->is_platform_app())); | 83 (*app)->is_platform_app())); |
| 84 } else { | 84 } else { |
| 85 RemoveApp((*app)->id()); | 85 RemoveApp((*app)->id(), false); |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| 90 void ExtensionAppModelBuilder::OnExtensionPreferenceChanged() { | 90 void ExtensionAppModelBuilder::OnExtensionPreferenceChanged() { |
| 91 model()->NotifyExtensionPreferenceChanged(); | 91 model()->NotifyExtensionPreferenceChanged(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void ExtensionAppModelBuilder::OnBeginExtensionInstall( | 94 void ExtensionAppModelBuilder::OnBeginExtensionInstall( |
| 95 const ExtensionInstallParams& params) { | 95 const ExtensionInstallParams& params) { |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 "", | 238 "", |
| 239 gfx::ImageSkia(), | 239 gfx::ImageSkia(), |
| 240 (*app)->is_platform_app())); | 240 (*app)->is_platform_app())); |
| 241 } | 241 } |
| 242 } | 242 } |
| 243 | 243 |
| 244 ExtensionAppItem* ExtensionAppModelBuilder::GetExtensionAppItem( | 244 ExtensionAppItem* ExtensionAppModelBuilder::GetExtensionAppItem( |
| 245 const std::string& extension_id) { | 245 const std::string& extension_id) { |
| 246 return static_cast<ExtensionAppItem*>(GetAppItem(extension_id)); | 246 return static_cast<ExtensionAppItem*>(GetAppItem(extension_id)); |
| 247 } | 247 } |
| OLD | NEW |