Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc

Issue 2349313002: [Merge-M53] arc: Fix Drag&Drop for PlayStore item from App List to Shelf. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
index ea4a4571ce9dce5f207459e7d9f3914768c6253c..a45f04f630567bcfdebc5728f0edd2b5ffb9ebb5 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc
@@ -913,12 +913,14 @@ void ChromeLauncherControllerImpl::OnShelfVisibilityStateChanged(
ash::ShelfID ChromeLauncherControllerImpl::GetShelfIDForAppID(
const std::string& app_id) {
+ const std::string shelf_app_id =
+ ArcAppWindowLauncherController::GetShelfAppIdFromArcAppId(app_id);
for (IDToItemControllerMap::const_iterator i =
id_to_item_controller_map_.begin();
i != id_to_item_controller_map_.end(); ++i) {
if (i->second->type() == LauncherItemController::TYPE_APP_PANEL)
continue; // Don't include panels
- if (i->second->app_id() == app_id)
+ if (i->second->app_id() == shelf_app_id)
return i->first;
}
return 0;
@@ -937,27 +939,33 @@ const std::string& ChromeLauncherControllerImpl::GetAppIDForShelfID(
}
void ChromeLauncherControllerImpl::PinAppWithID(const std::string& app_id) {
- if (GetPinnableForAppID(app_id, profile_) ==
+ const std::string shelf_app_id =
+ ArcAppWindowLauncherController::GetShelfAppIdFromArcAppId(app_id);
+ if (GetPinnableForAppID(shelf_app_id, profile_) ==
AppListControllerDelegate::PIN_EDITABLE)
- DoPinAppWithID(app_id);
+ DoPinAppWithID(shelf_app_id);
else
NOTREACHED();
}
bool ChromeLauncherControllerImpl::IsAppPinned(const std::string& app_id) {
+ const std::string shelf_app_id =
+ ArcAppWindowLauncherController::GetShelfAppIdFromArcAppId(app_id);
for (IDToItemControllerMap::const_iterator i =
id_to_item_controller_map_.begin();
i != id_to_item_controller_map_.end(); ++i) {
- if (IsPinned(i->first) && i->second->app_id() == app_id)
+ if (IsPinned(i->first) && i->second->app_id() == shelf_app_id)
return true;
}
return false;
}
void ChromeLauncherControllerImpl::UnpinAppWithID(const std::string& app_id) {
- if (GetPinnableForAppID(app_id, profile_) ==
+ const std::string shelf_app_id =
+ ArcAppWindowLauncherController::GetShelfAppIdFromArcAppId(app_id);
+ if (GetPinnableForAppID(shelf_app_id, profile_) ==
AppListControllerDelegate::PIN_EDITABLE)
- DoUnpinAppWithID(app_id, true /* update_prefs */);
+ DoUnpinAppWithID(shelf_app_id, true /* update_prefs */);
else
NOTREACHED();
}
« no previous file with comments | « chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698