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

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: Type converter arg change. Created 5 years, 8 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 96000e029e632ff1945dc4e0c38e766d68c8906a..fbec8eb0a7053cfcc102186afc921809c0785dbd 100644
--- a/chrome/browser/image_decoder.h
+++ b/chrome/browser/image_decoder.h
@@ -17,6 +17,7 @@
#include "base/timer/timer.h"
#include "content/public/browser/utility_process_host.h"
#include "content/public/browser/utility_process_host_client.h"
+#include "services/image_decoder/public/interfaces/image_decoder.mojom.h"
class SkBitmap;
@@ -125,6 +126,9 @@ class ImageDecoder : public content::UtilityProcessHostClient {
void OnDecodeImageSucceeded(const SkBitmap& decoded_image, int request_id);
void OnDecodeImageFailed(int request_id);
+ // Mojo IPC callback.
+ void OnDecodeImageDone(int request_id, skia::BitmapPtr image);
+
// Removes the job from the map of requests.
void RemoveJob(const scoped_refptr<Job>& job);
@@ -146,6 +150,10 @@ class ImageDecoder : public content::UtilityProcessHostClient {
// The time Start was last called.
base::TimeTicks last_request_;
+ // Mojo service connection. Must always be bound/reset and used on the IO
+ // thread.
+ services::ImageDecoderPtr decoder_;
+
DISALLOW_COPY_AND_ASSIGN(ImageDecoder);
};

Powered by Google App Engine
This is Rietveld 408576698