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

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. 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
Index: chrome/browser/image_decoder.h
diff --git a/chrome/browser/image_decoder.h b/chrome/browser/image_decoder.h
index def5897d02636a6de6652786943901e53c5ed316..c9652d9231e357fee3f20e2c36f48c51e42f8e31 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.
@@ -150,6 +159,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_;
Sam McNally 2015/05/06 06:41:39 Why a scoped_ptr?
Anand Mistry (off Chromium) 2015/05/06 07:14:23 Let me paraphrase Dorothy: gyp, and gn, and deps!
+
DISALLOW_COPY_AND_ASSIGN(ImageDecoder);
};
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/image_decoder.cc » ('j') | chrome/utility/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698