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

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: Rebase and address comments. Created 5 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 | « chrome/browser/DEPS ('k') | chrome/browser/image_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/image_decoder.h
diff --git a/chrome/browser/image_decoder.h b/chrome/browser/image_decoder.h
index 9e0b3edeaff92cff17a04aac93b0cbc236e06c9e..09167604eee3184caf9e3b6e26bb4d86bb0105d5 100644
--- a/chrome/browser/image_decoder.h
+++ b/chrome/browser/image_decoder.h
@@ -11,6 +11,7 @@
#include "base/lazy_instance.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/sequence_checker.h"
#include "base/sequenced_task_runner.h"
#include "base/synchronization/lock.h"
@@ -20,6 +21,14 @@
class SkBitmap;
+namespace image_decoder {
+class ImageDecoder;
+}
+
+namespace mojo {
+template <typename T> class InterfacePtr;
+}
+
// This is a helper class for decoding images safely in a utility process. To
// use this, call ImageDecoder::Start(...) or
// ImageDecoder::StartWithOptions(...) on any thread.
@@ -152,6 +161,10 @@ class ImageDecoder : public content::UtilityProcessHostClient {
// unless a new decoding request resets the timer.
scoped_ptr<base::DelayTimer<ImageDecoder>> batch_mode_timer_;
+ // Mojo service connection. Must always be bound/reset and used on the IO
+ // thread.
+ scoped_ptr<mojo::InterfacePtr<image_decoder::ImageDecoder>> decoder_;
+
DISALLOW_COPY_AND_ASSIGN(ImageDecoder);
};
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/image_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698