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

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 Created 4 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
« 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 f320426545d0297174a72db3c1dac40849b8c50c..e9c3526b0683ed2ab95fef10a1c9a6e7287a5d1c 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>
@@ -18,6 +19,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"
@@ -154,7 +156,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);
};
« 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