Commit 183cf60b authored by Melissa Zhang's avatar Melissa Zhang Committed by Commit Bot

[Sharesheet] Add sharesheet zero state png.

This CL adds the sharesheet zero state png. This image
will be displayed in the sharesheet when no targets are available.

Bug: 1138037
Change-Id: Ie234ccb2d4c884641194d2c7dc80123d96913e47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2515505
Commit-Queue: Melissa Zhang <melzhang@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823891}
parent 07a24255
......@@ -279,6 +279,7 @@
<structure type="chrome_scaled_image" name="IDR_SETTINGS_FAVICON" file="common/favicon_settings.png" />
</if>
<if expr="chromeos">
<structure type="chrome_scaled_image" name="IDR_SHARESHEET_EMPTY" file="cros/sharesheet_empty.png" />
<structure type="chrome_scaled_image" name="IDR_SMB_ICON" file="cros/smb_icon.png" />
<structure type="chrome_scaled_image" name="IDR_LOGO_AVATAR_CIRCLE_BLUE_COLOR" file="cros/logo_avatar_circle_blue_color.png" />
<structure type="chrome_scaled_image" name="IDR_LOGO_GOOGLE_COLOR_90" file="cros/logo_google_color_90.png" />
......
......@@ -9,18 +9,21 @@
#include "base/i18n/rtl.h"
#include "base/strings/string16.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sharesheet/sharesheet_metrics.h"
#include "chrome/browser/sharesheet/sharesheet_service_delegate.h"
#include "chrome/browser/ui/views/sharesheet/sharesheet_expand_button.h"
#include "chrome/browser/ui/views/sharesheet/sharesheet_target_button.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/app_window/app_window_registry.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/accessibility/ax_enums.mojom-forward.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/geometry/insets.h"
......@@ -130,6 +133,11 @@ void SharesheetBubbleView::ShowBubble(
title->SetProperty(views::kMarginsKey, gfx::Insets(kSpacing));
if (targets.empty()) {
auto* image =
main_view_->AddChildView(std::make_unique<views::ImageView>());
image->SetImage(*ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
IDR_SHARESHEET_EMPTY));
image->SetProperty(views::kMarginsKey, gfx::Insets(0, 0, kSpacing, 0));
// TODO(crbug.com/1138037) Update label typography.
main_view_->AddChildView(std::make_unique<views::Label>(
l10n_util::GetStringUTF16(IDS_SHARESHEET_ZERO_STATE_LABEL)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment