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

Unified Diff: chrome/browser/ui/app_list/app_list_view_delegate.cc

Issue 1802473002: Add deprecation warning banner to App Launcher on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20170310-MacViews-ViewsUnittests
Patch Set: Separate function Created 4 years, 9 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/app_list/app_list_view_delegate.h ('k') | ui/app_list/app_list_view_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/app_list_view_delegate.cc
diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc
index 86e85c5289e8e24bdf0c004c0a842108f7081d6d..69486c21a3983732c5087a68a5f16521a9d853bf 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -85,6 +85,11 @@
#include "chrome/browser/web_applications/web_app_win.h"
#endif
+#if !defined(OS_CHROMEOS)
+#include "chrome/grit/chromium_strings.h"
+#include "chrome/grit/generated_resources.h"
+#include "ui/base/l10n/l10n_util.h"
+#endif
namespace chrome {
const char kAppLauncherCategoryTag[] = "AppLauncher";
@@ -786,6 +791,42 @@ void AppListViewDelegate::RemoveObserver(
observers_.RemoveObserver(observer);
}
+#if !defined(OS_CHROMEOS)
+base::string16 AppListViewDelegate::GetMessageTitle() const {
+ return l10n_util::GetStringUTF16(IDS_APP_LIST_MESSAGE_TITLE);
+}
+
+base::string16 AppListViewDelegate::GetMessageText(
+ size_t* message_break) const {
+ return l10n_util::GetStringFUTF16(IDS_APP_LIST_MESSAGE_TEXT, base::string16(),
+ message_break);
+}
+
+base::string16 AppListViewDelegate::GetAppsShortcutName() const {
+ return l10n_util::GetStringUTF16(IDS_BOOKMARK_BAR_APPS_SHORTCUT_NAME);
+}
+
+base::string16 AppListViewDelegate::GetLearnMoreText() const {
+ return l10n_util::GetStringUTF16(IDS_APP_LIST_MESSAGE_LEARN_MORE_TEXT);
+}
+
+base::string16 AppListViewDelegate::GetLearnMoreLink() const {
+ return l10n_util::GetStringUTF16(IDS_APP_LIST_MESSAGE_LEARN_MORE_LINK);
+}
+
+gfx::ImageSkia* AppListViewDelegate::GetAppsIcon() const {
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ // Ensure it's backed by a native image type in the ResourceBundle cache.
+ rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_APPS_SHORTCUT);
+ return rb.GetImageSkiaNamed(IDR_BOOKMARK_BAR_APPS_SHORTCUT);
+}
+
+void AppListViewDelegate::OpenLearnMoreLink() {
+ controller_->OpenURL(profile_, GURL(GetLearnMoreLink()),
+ ui::PAGE_TRANSITION_LINK, CURRENT_TAB);
+}
+#endif // !defined(OS_CHROMEOS)
+
void AppListViewDelegate::OnTemplateURLServiceChanged() {
if (!app_list::switches::IsExperimentalAppListEnabled())
return;
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.h ('k') | ui/app_list/app_list_view_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698