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

Unified Diff: chrome/utility/chrome_content_utility_client.h

Issue 482163002: Large wallpaper decoding in utility process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add space Created 6 years, 3 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/common/chrome_utility_messages.h ('k') | chrome/utility/chrome_content_utility_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/chrome_content_utility_client.h
diff --git a/chrome/utility/chrome_content_utility_client.h b/chrome/utility/chrome_content_utility_client.h
index e70106469d00a52775e65e8b875be8cb29ff97ea..590bc18491095c8b98cbeeeb0bf19d6b07e4aa00 100644
--- a/chrome/utility/chrome_content_utility_client.h
+++ b/chrome/utility/chrome_content_utility_client.h
@@ -32,12 +32,20 @@ class ChromeContentUtilityClient : public content::ContentUtilityClient {
static void PreSandboxStartup();
// Shared with extensions::ExtensionsHandler.
- static void DecodeImage(const std::vector<unsigned char>& encoded_data);
+ static SkBitmap DecodeImage(const std::vector<unsigned char>& encoded_data,
+ bool shrink_to_fit);
+ static void DecodeImageAndSend(const std::vector<unsigned char>& encoded_data,
+ bool shrink_to_fit);
+
+ static void set_max_ipc_message_size_for_test(int64_t max_message_size) {
+ max_ipc_message_size_ = max_message_size;
+ }
private:
// IPC message handlers.
void OnUnpackWebResource(const std::string& resource_data);
- void OnDecodeImage(const std::vector<unsigned char>& encoded_data);
+ void OnDecodeImage(const std::vector<unsigned char>& encoded_data,
+ bool shrink_to_fit);
void OnRobustJPEGDecodeImage(
const std::vector<unsigned char>& encoded_data);
@@ -71,6 +79,8 @@ class ChromeContentUtilityClient : public content::ContentUtilityClient {
bool filter_messages_;
// A list of message_ids to filter.
std::set<int> message_id_whitelist_;
+ // Maximum IPC msg size (default to kMaximumMessageSize; override for testing)
+ static int64_t max_ipc_message_size_;
DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient);
};
« no previous file with comments | « chrome/common/chrome_utility_messages.h ('k') | chrome/utility/chrome_content_utility_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698