Skip to content

Commit

Permalink
lacros: Use chrome canary icon for lacros shelf icon
Browse files Browse the repository at this point in the history
Screenshot: http://screen/7guHmLm7UpO

Bug: 1072472
Change-Id: Ia69f06588686417db64c50fe7b2df25b5de8f2b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2163807
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762202}
  • Loading branch information
James Cook authored and Commit Bot committed Apr 24, 2020
1 parent 95406f4 commit 69de8fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions chrome/app/theme/chrome_unscaled_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<if expr="chromeos">
<include name="IDR_PRODUCT_LOGO_24PX_1X" file="google_chrome/chrome_24px_1x.svg" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_24PX_2X" file="google_chrome/chrome_24px_2x.svg" type="BINDATA" />
<!-- Used by lacros. -->
<include name="IDR_PRODUCT_LOGO_256_CANARY" file="google_chrome/product_logo_256_canary.png" type="BINDATA" />
</if>
<if expr="is_win">
<!-- External company logo, displayed in the Chrome Cleanup WebUI if
Expand Down
10 changes: 8 additions & 2 deletions chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/branding_buildflags.h"
#include "build/buildflag.h"
#include "chrome/browser/apps/app_service/app_service_proxy.h"
#include "chrome/browser/apps/app_service/app_service_proxy_factory.h"
#include "chrome/browser/chromeos/arc/arc_util.h"
Expand Down Expand Up @@ -1228,8 +1230,12 @@ void ChromeLauncherController::CreateLacrosBrowserShortcut() {
shortcut.type = ash::TYPE_LACROS_BROWSER;
shortcut.id = ash::ShelfID(kLacrosAppId);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
// TODO(jamescook): Custom icon.
shortcut.image = *rb.GetImageSkiaNamed(IDR_CHROME_APP_ICON_192);
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
// Canary icon only exists in branded builds.
shortcut.image = *rb.GetImageSkiaNamed(IDR_PRODUCT_LOGO_256_CANARY);
#else
shortcut.image = *rb.GetImageSkiaNamed(IDR_PRODUCT_LOGO_256);
#endif
// TODO(jamescook): Real name.
shortcut.title = base::ASCIIToUTF16("LaCrOS");
// Set the delegate first to avoid constructing another one in ShelfItemAdded.
Expand Down

0 comments on commit 69de8fc

Please sign in to comment.