Commit bd568189 authored by Maggie Cai's avatar Maggie Cai Committed by Commit Bot

[Sharesheet] Add temp icon from drive share action.

Currently the drive share action returns an empty icon, however this
will no pass a size DCHECK. The reason we return an empty icon is
because there is some refactoring needed for the GetActionIcon method
and we should not create the icon at this stage (crbug.com/1127750).
However because we don't want to cause a DCHECK failure, and also there
is already another implementation that does the same thing, so I will
add this temp solution and this will be fixted together.

BUG=1097623

Change-Id: Iff4fcaac6aa0d2308d9b9539f861303164346f9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2409850Reviewed-by: default avatarMelissa Zhang <melzhang@chromium.org>
Commit-Queue: Maggie Cai <mxcai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806917}
parent 6c76743a
......@@ -8,6 +8,7 @@
#include <vector>
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/sharesheet/sharesheet_types.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_navigator_params.h"
......@@ -17,6 +18,7 @@
#include "ui/base/window_open_disposition.h"
#include "ui/chromeos/strings/grit/ui_chromeos_strings.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/paint_vector_icon.h"
#include "url/gurl.h"
DriveShareAction::DriveShareAction() = default;
......@@ -30,7 +32,8 @@ const base::string16 DriveShareAction::GetActionName() {
const gfx::ImageSkia DriveShareAction::GetActionIcon() {
// TODO(crbug.com/1127750): Update to create the Icon at the
// Sharesheet bubble view. Only get the VectorIcon here.
return gfx::ImageSkia();
return gfx::CreateVectorIcon(kPersonAddIcon, sharesheet::kIconSize,
gfx::kPlaceholderColor);
}
void DriveShareAction::LaunchAction(
......
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