Take FilePath ref in SetPreview
The file path is only used in the ctor for HoldingSpaceImage, which takes a FilePath ref. Bug: b:344717756 Change-Id: I6a6a21003e9f4ac9bcd32d7370fd9a431d503ff5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5722594 Commit-Queue: Michael Cui <mlcui@google.com> Reviewed-by: Darren Shen <shend@chromium.org> Cr-Commit-Position: refs/heads/main@{#1330037}
This commit is contained in:
ash/picker/views
@ -19,6 +19,7 @@
|
||||
#include "ash/strings/grit/ash_strings.h"
|
||||
#include "ash/style/style_util.h"
|
||||
#include "ash/style/typography.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "third_party/skia/include/core/SkPath.h"
|
||||
#include "third_party/skia/include/core/SkScalar.h"
|
||||
@ -243,7 +244,7 @@ void PickerListItemView::SetBadgeVisible(bool visible) {
|
||||
|
||||
void PickerListItemView::SetPreview(
|
||||
PickerPreviewBubbleController* preview_bubble_controller,
|
||||
base::FilePath file_path,
|
||||
const base::FilePath& file_path,
|
||||
AsyncBitmapResolver async_bitmap_resolver,
|
||||
bool update_icon) {
|
||||
if (preview_bubble_controller_ != nullptr) {
|
||||
|
@ -12,10 +12,13 @@
|
||||
#include "ash/picker/model/picker_action_type.h"
|
||||
#include "ash/picker/views/picker_item_view.h"
|
||||
#include "ash/public/cpp/holding_space/holding_space_image.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "ui/base/metadata/metadata_header_macros.h"
|
||||
#include "ui/gfx/geometry/size.h"
|
||||
|
||||
namespace base {
|
||||
class FilePath;
|
||||
}
|
||||
|
||||
namespace ui {
|
||||
class ImageModel;
|
||||
}
|
||||
@ -61,7 +64,7 @@ class ASH_EXPORT PickerListItemView : public PickerItemView {
|
||||
// item is hovered on. If `update_icon` is true, then the leading icon of this
|
||||
// item will also be updated to match the thumbnail.
|
||||
void SetPreview(PickerPreviewBubbleController* preview_bubble_controller,
|
||||
base::FilePath file_path,
|
||||
const base::FilePath& file_path,
|
||||
AsyncBitmapResolver async_bitmap_resolver,
|
||||
bool update_icon = false);
|
||||
|
||||
|
Reference in New Issue
Block a user