Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5733)

Unified Diff: ash/sysui/shelf_delegate_mus.cc

Issue 2014013002: Add SkBitmap StructTraits for skia::mojo::Bitmap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/sysui/shelf_delegate_mus.h ('k') | chrome/browser/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/sysui/shelf_delegate_mus.cc
diff --git a/ash/sysui/shelf_delegate_mus.cc b/ash/sysui/shelf_delegate_mus.cc
index 1d8a4073a70a5c2cf3fd9b3dee0a2814ff75b86e..40a69115b145e4fb9a00de49f3b7a1b32cecb7b2 100644
--- a/ash/sysui/shelf_delegate_mus.cc
+++ b/ash/sysui/shelf_delegate_mus.cc
@@ -21,7 +21,6 @@
#include "components/mus/public/cpp/window_property.h"
#include "mojo/common/common_type_converters.h"
#include "services/shell/public/cpp/connector.h"
-#include "skia/public/type_converters.h"
#include "ui/aura/mus/mus_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image_skia.h"
@@ -314,7 +313,7 @@ void ShelfDelegateMus::PinItem(
ShelfItem shelf_item;
shelf_item.type = TYPE_APP_SHORTCUT;
shelf_item.status = STATUS_CLOSED;
- shelf_item.image = GetShelfIconFromBitmap(item->image.To<SkBitmap>());
+ shelf_item.image = GetShelfIconFromBitmap(item->image);
model_->Add(shelf_item);
std::unique_ptr<ShelfItemDelegateMus> item_delegate(
@@ -341,14 +340,14 @@ void ShelfDelegateMus::UnpinItem(const mojo::String& app_id) {
}
void ShelfDelegateMus::SetItemImage(const mojo::String& app_id,
- skia::mojom::BitmapPtr image) {
+ const SkBitmap& image) {
if (!app_id_to_shelf_id_.count(app_id.To<std::string>()))
return;
ShelfID shelf_id = app_id_to_shelf_id_[app_id.To<std::string>()];
int index = model_->ItemIndexByID(shelf_id);
DCHECK_GE(index, 0);
ShelfItem item = *model_->ItemByID(shelf_id);
- item.image = GetShelfIconFromBitmap(image.To<SkBitmap>());
+ item.image = GetShelfIconFromBitmap(image);
model_->Set(index, item);
}
« no previous file with comments | « ash/sysui/shelf_delegate_mus.h ('k') | chrome/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698