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

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

Issue 1921403002: Pin apps from prefs on the mash shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only use ChromeMashShelfController with use_ash=1. Created 4 years, 8 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/launcher_item_controller.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/launcher_item_controller.cc
index c6c35dd429bb7420fb9a4790aa22a79b098520b7..69fc8a4a23a8172d8a8a8001f8c02e7cd68b2277 100644
--- a/chrome/browser/ui/ash/launcher/launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_item_controller.cc
@@ -4,15 +4,7 @@
#include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
-#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
-#include "extensions/browser/extension_registry.h"
-#include "extensions/common/extension.h"
-
-#if defined(OS_CHROMEOS)
-#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
-#endif // defined(OS_CHROMEOS)
LauncherItemController::LauncherItemController(
Type type,
@@ -23,44 +15,9 @@ LauncherItemController::LauncherItemController(
shelf_id_(0),
launcher_controller_(launcher_controller),
locked_(0),
- image_set_by_controller_(false) {
-}
-
-LauncherItemController::~LauncherItemController() {
-}
-
-const std::string& LauncherItemController::app_id() const {
- return app_id_;
-}
-
-base::string16 LauncherItemController::GetAppTitle() const {
- base::string16 title;
- if (app_id_.empty())
- return title;
+ image_set_by_controller_(false) {}
-#if defined(OS_CHROMEOS)
- // Get title if the app is an Arc app
- ArcAppListPrefs* arc_prefs =
- ArcAppListPrefs::Get(launcher_controller_->profile());
- DCHECK(arc_prefs);
- if (arc_prefs->IsRegistered(app_id_)) {
- std::unique_ptr<ArcAppListPrefs::AppInfo> app_info =
- arc_prefs->GetApp(app_id_);
- DCHECK(app_info.get());
- if (app_info)
- title = base::UTF8ToUTF16(app_info->name);
- return title;
- }
-#endif // defined(OS_CHROMEOS)
-
- const extensions::Extension* extension =
- extensions::ExtensionRegistry::Get(
- launcher_controller_->profile())->GetExtensionById(
- app_id_, extensions::ExtensionRegistry::EVERYTHING);
- if (extension)
- title = base::UTF8ToUTF16(extension->name());
- return title;
-}
+LauncherItemController::~LauncherItemController() {}
ash::ShelfItemType LauncherItemController::GetShelfItemType() const {
switch (type_) {
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_item_controller.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698