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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 } | 121 } |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 void ExtensionAppModelBuilder::OnExtensionPreferenceChanged() { | 125 void ExtensionAppModelBuilder::OnExtensionPreferenceChanged() { |
126 model_->NotifyExtensionPreferenceChanged(); | 126 model_->NotifyExtensionPreferenceChanged(); |
127 } | 127 } |
128 | 128 |
129 void ExtensionAppModelBuilder::OnBeginExtensionInstall( | 129 void ExtensionAppModelBuilder::OnBeginExtensionInstall( |
130 const ExtensionInstallParams& params) { | 130 const ExtensionInstallParams& params) { |
131 if (!params.is_app || params.is_ephemeral) | 131 if (!params.is_app) |
132 return; | 132 return; |
133 | 133 |
134 DVLOG(2) << service_ << ": OnBeginExtensionInstall: " | 134 DVLOG(2) << service_ << ": OnBeginExtensionInstall: " |
135 << params.extension_id.substr(0, 8); | 135 << params.extension_id.substr(0, 8); |
136 ExtensionAppItem* existing_item = GetExtensionAppItem(params.extension_id); | 136 ExtensionAppItem* existing_item = GetExtensionAppItem(params.extension_id); |
137 if (existing_item) { | 137 if (existing_item) { |
138 existing_item->SetIsInstalling(true); | 138 existing_item->SetIsInstalling(true); |
139 return; | 139 return; |
140 } | 140 } |
141 | 141 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 app_list::AppListItem* item = item_list->item_at(idx + 1); | 326 app_list::AppListItem* item = item_list->item_at(idx + 1); |
327 if (item->GetItemType() == ExtensionAppItem::kItemType) { | 327 if (item->GetItemType() == ExtensionAppItem::kItemType) { |
328 next = static_cast<ExtensionAppItem*>(item); | 328 next = static_cast<ExtensionAppItem*>(item); |
329 break; | 329 break; |
330 } | 330 } |
331 } | 331 } |
332 // item->Move will call set_position, overriding the item's position. | 332 // item->Move will call set_position, overriding the item's position. |
333 if (prev || next) | 333 if (prev || next) |
334 static_cast<ExtensionAppItem*>(item)->Move(prev, next); | 334 static_cast<ExtensionAppItem*>(item)->Move(prev, next); |
335 } | 335 } |
OLD | NEW |