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

Unified Diff: chrome/browser/image_decoder.h

Issue 1844103004: Convert 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 4 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 5f3dbaa9e04ced04edbc90594fdf40c68b7a482e..5e2845dd2f5a7a0c15f59866929dc49310f94abc 100644
--- a/chrome/browser/image_decoder.h
+++ b/chrome/browser/image_decoder.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_IMAGE_DECODER_H_
#include <map>
+#include <memory>
#include <string>
#include <vector>
@@ -17,6 +18,7 @@
#include "base/synchronization/lock.h"
#include "base/timer/timer.h"
#include "build/build_config.h"
+#include "chrome/common/image_decoder.mojom.h"
#include "content/public/browser/utility_process_host.h"
#include "content/public/browser/utility_process_host_client.h"
@@ -153,7 +155,11 @@ class ImageDecoder : public content::UtilityProcessHostClient {
// Calls StopBatchMode() after |kBatchModeTimeoutSeconds| have elapsed,
// unless a new decoding request resets the timer.
- scoped_ptr<base::DelayTimer> batch_mode_timer_;
+ std::unique_ptr<base::DelayTimer> batch_mode_timer_;
+
+ // Mojo service connection. Must always be bound/reset and used on the IO
+ // thread.
+ mojom::ImageDecoderPtr decoder_;
DISALLOW_COPY_AND_ASSIGN(ImageDecoder);
};

Powered by Google App Engine
This is Rietveld 408576698