diff options
author | estade <estade@chromium.org> | 2015-09-08 11:38:39 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-08 18:39:59 +0000 |
commit | 876515eddd414cb74d00079eb87c4591f5e94f54 (patch) | |
tree | d3c3c652f0b73539567d38923bd79563ec09dfcc | |
parent | 4183810c9f14f95d39ef32c4d6570a6be9bc803a (diff) | |
download | chromium_src-876515eddd414cb74d00079eb87c4591f5e94f54.zip chromium_src-876515eddd414cb74d00079eb87c4591f5e94f54.tar.gz chromium_src-876515eddd414cb74d00079eb87c4591f5e94f54.tar.bz2 |
Restore old bookmark bar folders on win non-MD.
Still available on win with --top-chrome-md flag, and used elsewhere by
default. This behavior approved by sgabriel.
BUG=527923
Review URL: https://codereview.chromium.org/1319283004
Cr-Commit-Position: refs/heads/master@{#347749}
-rw-r--r-- | chrome/app/theme/default_100_percent/win/bookmark_bar_folder_managed.png | bin | 0 -> 339 bytes | |||
-rw-r--r-- | chrome/app/theme/default_100_percent/win/bookmark_bar_folder_supervised.png | bin | 0 -> 448 bytes | |||
-rw-r--r-- | chrome/app/theme/default_200_percent/win/bookmark_bar_folder_managed.png | bin | 0 -> 1338 bytes | |||
-rw-r--r-- | chrome/app/theme/default_200_percent/win/bookmark_bar_folder_supervised.png | bin | 0 -> 1510 bytes | |||
-rw-r--r-- | chrome/app/theme/theme_resources.grd | 4 | ||||
-rw-r--r-- | chrome/browser/ui/bookmarks/bookmark_utils.cc | 27 |
6 files changed, 31 insertions, 0 deletions
diff --git a/chrome/app/theme/default_100_percent/win/bookmark_bar_folder_managed.png b/chrome/app/theme/default_100_percent/win/bookmark_bar_folder_managed.png Binary files differnew file mode 100644 index 0000000..4485f14 --- /dev/null +++ b/chrome/app/theme/default_100_percent/win/bookmark_bar_folder_managed.png diff --git a/chrome/app/theme/default_100_percent/win/bookmark_bar_folder_supervised.png b/chrome/app/theme/default_100_percent/win/bookmark_bar_folder_supervised.png Binary files differnew file mode 100644 index 0000000..5e43367 --- /dev/null +++ b/chrome/app/theme/default_100_percent/win/bookmark_bar_folder_supervised.png diff --git a/chrome/app/theme/default_200_percent/win/bookmark_bar_folder_managed.png b/chrome/app/theme/default_200_percent/win/bookmark_bar_folder_managed.png Binary files differnew file mode 100644 index 0000000..7e6127e --- /dev/null +++ b/chrome/app/theme/default_200_percent/win/bookmark_bar_folder_managed.png diff --git a/chrome/app/theme/default_200_percent/win/bookmark_bar_folder_supervised.png b/chrome/app/theme/default_200_percent/win/bookmark_bar_folder_supervised.png Binary files differnew file mode 100644 index 0000000..18de87f --- /dev/null +++ b/chrome/app/theme/default_200_percent/win/bookmark_bar_folder_supervised.png diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd index 7f884a5..2398ae5 100644 --- a/chrome/app/theme/theme_resources.grd +++ b/chrome/app/theme/theme_resources.grd @@ -136,6 +136,10 @@ <if expr="not is_macosx and not is_ios"> <structure type="chrome_scaled_image" name="IDR_BOOKMARK_BAR_FOLDER" file="common/bookmark_bar_folder.png" /> </if> + <if expr="is_win"> + <structure type="chrome_scaled_image" name="IDR_BOOKMARK_BAR_FOLDER_MANAGED" file="win/bookmark_bar_folder_managed.png" /> + <structure type="chrome_scaled_image" name="IDR_BOOKMARK_BAR_FOLDER_SUPERVISED" file="win/bookmark_bar_folder_supervised.png" /> + </if> <structure type="chrome_scaled_image" name="IDR_BOOKMARK_BAR_APPS_SHORTCUT" file="common/apps_bookmark_bar_icon.png" /> <if expr="chromeos"> <structure type="chrome_scaled_image" name="IDR_BUTTON_USER_IMAGE_CHOOSE_FILE" file="cros/choose_file.png" /> diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc index 6e91d79..e178b9f 100644 --- a/chrome/browser/ui/bookmarks/bookmark_utils.cc +++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc @@ -45,6 +45,12 @@ #include "ui/native_theme/native_theme.h" #endif +#if defined(OS_WIN) +#include "chrome/grit/theme_resources.h" +#include "ui/base/resource/material_design/material_design_controller.h" +#include "ui/base/resource/resource_bundle.h" +#endif + using bookmarks::BookmarkModel; using bookmarks::BookmarkNode; @@ -499,14 +505,35 @@ bool IsValidBookmarkDropLocation(Profile* profile, #if defined(TOOLKIT_VIEWS) gfx::ImageSkia GetBookmarkFolderIcon() { +#if defined(OS_WIN) + if (!ui::MaterialDesignController::IsModeMaterial()) { + return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( + IDR_BOOKMARK_BAR_FOLDER); + } +#endif + return GetFolderIcon(gfx::VectorIconId::FOLDER); } gfx::ImageSkia GetBookmarkSupervisedFolderIcon() { +#if defined(OS_WIN) + if (!ui::MaterialDesignController::IsModeMaterial()) { + return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( + IDR_BOOKMARK_BAR_FOLDER_SUPERVISED); + } +#endif + return GetFolderIcon(gfx::VectorIconId::FOLDER_SUPERVISED); } gfx::ImageSkia GetBookmarkManagedFolderIcon() { +#if defined(OS_WIN) + if (!ui::MaterialDesignController::IsModeMaterial()) { + return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( + IDR_BOOKMARK_BAR_FOLDER_MANAGED); + } +#endif + return GetFolderIcon(gfx::VectorIconId::FOLDER_MANAGED); } #endif |