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

Unified Diff: chrome/browser/ui/bookmarks/bookmark_utils.cc

Issue 1319213004: Update bookmark bar folder icons to MD; vectorize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bug Created 5 years, 4 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
Index: chrome/browser/ui/bookmarks/bookmark_utils.cc
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc
index 9d7fca293c94720ba513c3e37fe714354fe00438..759bc0e511e0f654d63a3153bbeb97aec99b2abd 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc
@@ -38,6 +38,13 @@
#include "extensions/common/extension_set.h"
#endif
+#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
+#include "ui/gfx/paint_vector_icon.h"
+#include "ui/gfx/vector_icons_public.h"
+#include "ui/native_theme/common_theme.h"
+#include "ui/native_theme/native_theme.h"
+#endif
+
using bookmarks::BookmarkModel;
using bookmarks::BookmarkNode;
@@ -197,6 +204,15 @@ BookmarkShortcutDisposition GetBookmarkShortcutDisposition(Profile* profile) {
return BOOKMARK_SHORTCUT_DISPOSITION_UNCHANGED;
}
+#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
+gfx::ImageSkia GetFolderIcon(gfx::VectorIconId id) {
+ SkColor icon_color;
+ ui::CommonThemeGetSystemColor(ui::NativeTheme::kColorId_ChromeIconGrey,
+ &icon_color);
+ return gfx::CreateVectorIcon(id, 16, icon_color);
+}
+#endif
+
} // namespace
void OpenAll(gfx::NativeWindow parent,
@@ -481,4 +497,18 @@ bool IsValidBookmarkDropLocation(Profile* profile,
return true;
}
+#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
+gfx::ImageSkia GetBookmarkFolderIcon() {
+ return GetFolderIcon(gfx::VectorIconId::FOLDER);
+}
+
+gfx::ImageSkia GetBookmarkSupervisedFolderIcon() {
+ return GetFolderIcon(gfx::VectorIconId::FOLDER_SUPERVISED);
+}
+
+gfx::ImageSkia GetBookmarkManagedFolderIcon() {
+ return GetFolderIcon(gfx::VectorIconId::FOLDER_MANAGED);
+}
+#endif
+
} // namespace chrome
« no previous file with comments | « chrome/browser/ui/bookmarks/bookmark_utils.h ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698