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

Unified Diff: chrome/browser/image_decoder.h

Issue 1028543002: Turn the utility process image decoder into a Mojo service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move to //services. Created 5 years, 9 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
Index: chrome/browser/image_decoder.h
diff --git a/chrome/browser/image_decoder.h b/chrome/browser/image_decoder.h
index 2206dd9f454ebcbfc3a29674cf41e1d42eb594ee..389c18706c573a310c33a0e72245b56fbe7278c6 100644
--- a/chrome/browser/image_decoder.h
+++ b/chrome/browser/image_decoder.h
@@ -12,6 +12,7 @@
#include "base/memory/ref_counted.h"
#include "base/threading/sequenced_worker_pool.h"
#include "content/public/browser/utility_process_host_client.h"
+#include "services/image_decoder/public/interfaces/image_decoder.mojom.h"
class SkBitmap;
@@ -72,11 +73,15 @@ class ImageDecoder : public content::UtilityProcessHostClient {
// Launches sandboxed process that will decode the image.
void DecodeImageInSandbox(const std::vector<unsigned char>& image_data);
+ // Mojo RPC callback.
+ void OnDecodeImageDone(bool success, services::image_decoder::ImagePtr image);
+
Delegate* delegate_;
std::vector<unsigned char> image_data_;
const ImageCodec image_codec_;
scoped_refptr<base::SequencedTaskRunner> task_runner_;
- bool shrink_to_fit_; // if needed for IPC msg size limit
+ bool shrink_to_fit_; // if needed for IPC msg size limit
+ services::image_decoder::ImageDecoderPtr decoder_;
DISALLOW_COPY_AND_ASSIGN(ImageDecoder);
};

Powered by Google App Engine
This is Rietveld 408576698