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

Side by Side Diff: chrome/utility/chrome_content_utility_client.h

Issue 1159363002: [Download Notification] Show preview if downloaded file is image (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adressed comment #10 Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ 5 #ifndef CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_
6 #define CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ 6 #define CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 28 matching lines...) Expand all
39 bool shrink_to_fit, 39 bool shrink_to_fit,
40 int request_id); 40 int request_id);
41 41
42 static void set_max_ipc_message_size_for_test(int64_t max_message_size) { 42 static void set_max_ipc_message_size_for_test(int64_t max_message_size) {
43 max_ipc_message_size_ = max_message_size; 43 max_ipc_message_size_ = max_message_size;
44 } 44 }
45 45
46 private: 46 private:
47 // IPC message handlers. 47 // IPC message handlers.
48 void OnUnpackWebResource(const std::string& resource_data); 48 void OnUnpackWebResource(const std::string& resource_data);
49 void OnDecodeImageByHandle(const IPC::PlatformFileForTransit& image_file,
50 bool shrink_to_fit,
51 int request_id);
49 void OnDecodeImage(const std::vector<unsigned char>& encoded_data, 52 void OnDecodeImage(const std::vector<unsigned char>& encoded_data,
50 bool shrink_to_fit, 53 bool shrink_to_fit,
51 int request_id); 54 int request_id);
52 #if defined(OS_CHROMEOS) 55 #if defined(OS_CHROMEOS)
53 void OnRobustJPEGDecodeImage(const std::vector<unsigned char>& encoded_data, 56 void OnRobustJPEGDecodeImage(const std::vector<unsigned char>& encoded_data,
54 int request_id); 57 int request_id);
55 58
56 void OnCreateZipFile(const base::FilePath& src_dir, 59 void OnCreateZipFile(const base::FilePath& src_dir,
57 const std::vector<base::FilePath>& src_relative_paths, 60 const std::vector<base::FilePath>& src_relative_paths,
58 const base::FileDescriptor& dest_fd); 61 const base::FileDescriptor& dest_fd);
(...skipping 29 matching lines...) Expand all
88 bool filter_messages_; 91 bool filter_messages_;
89 // A list of message_ids to filter. 92 // A list of message_ids to filter.
90 std::set<int> message_id_whitelist_; 93 std::set<int> message_id_whitelist_;
91 // Maximum IPC msg size (default to kMaximumMessageSize; override for testing) 94 // Maximum IPC msg size (default to kMaximumMessageSize; override for testing)
92 static int64_t max_ipc_message_size_; 95 static int64_t max_ipc_message_size_;
93 96
94 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient); 97 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient);
95 }; 98 };
96 99
97 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ 100 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698