OLD | NEW |
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 "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 class UtilityMessageHandler; | 31 class UtilityMessageHandler; |
32 | 32 |
33 class ChromeContentUtilityClient : public content::ContentUtilityClient { | 33 class ChromeContentUtilityClient : public content::ContentUtilityClient { |
34 public: | 34 public: |
35 ChromeContentUtilityClient(); | 35 ChromeContentUtilityClient(); |
36 virtual ~ChromeContentUtilityClient(); | 36 virtual ~ChromeContentUtilityClient(); |
37 | 37 |
38 virtual void UtilityThreadStarted() OVERRIDE; | 38 virtual void UtilityThreadStarted() OVERRIDE; |
39 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 39 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
40 | 40 |
41 static void PreSandboxStartup(); | 41 static void PreSandboxStartup(const base::FilePath& media_path); |
42 | 42 |
43 private: | 43 private: |
44 // IPC message handlers. | 44 // IPC message handlers. |
45 void OnUnpackExtension(const base::FilePath& extension_path, | 45 void OnUnpackExtension(const base::FilePath& extension_path, |
46 const std::string& extension_id, | 46 const std::string& extension_id, |
47 int location, int creation_flags); | 47 int location, int creation_flags); |
48 void OnUnpackWebResource(const std::string& resource_data); | 48 void OnUnpackWebResource(const std::string& resource_data); |
49 void OnParseUpdateManifest(const std::string& xml); | 49 void OnParseUpdateManifest(const std::string& xml); |
50 void OnDecodeImage(const std::vector<unsigned char>& encoded_data); | 50 void OnDecodeImage(const std::vector<unsigned char>& encoded_data); |
51 void OnDecodeImageBase64(const std::string& encoded_data); | 51 void OnDecodeImageBase64(const std::string& encoded_data); |
(...skipping 23 matching lines...) Expand all Loading... |
75 bool autorotate, | 75 bool autorotate, |
76 const std::vector<printing::PageRange>& page_ranges, | 76 const std::vector<printing::PageRange>& page_ranges, |
77 int* highest_rendered_page_number, | 77 int* highest_rendered_page_number, |
78 double* scale_factor); | 78 double* scale_factor); |
79 #endif // defined(OS_WIN) | 79 #endif // defined(OS_WIN) |
80 | 80 |
81 void OnGetPrinterCapsAndDefaults(const std::string& printer_name); | 81 void OnGetPrinterCapsAndDefaults(const std::string& printer_name); |
82 void OnStartupPing(); | 82 void OnStartupPing(); |
83 void OnAnalyzeZipFileForDownloadProtection( | 83 void OnAnalyzeZipFileForDownloadProtection( |
84 IPC::PlatformFileForTransit zip_file); | 84 IPC::PlatformFileForTransit zip_file); |
| 85 void OnCheckMediaFile(int64 milliseconds_of_decoding, |
| 86 IPC::PlatformFileForTransit media_file); |
85 | 87 |
86 #if defined(OS_WIN) | 88 #if defined(OS_WIN) |
87 void OnParseITunesPrefXml(const std::string& itunes_xml_data); | 89 void OnParseITunesPrefXml(const std::string& itunes_xml_data); |
88 #endif // defined(OS_WIN) | 90 #endif // defined(OS_WIN) |
89 | 91 |
90 #if defined(OS_WIN) || defined(OS_MACOSX) | 92 #if defined(OS_WIN) || defined(OS_MACOSX) |
91 void OnParseITunesLibraryXmlFile( | 93 void OnParseITunesLibraryXmlFile( |
92 IPC::PlatformFileForTransit itunes_library_file); | 94 IPC::PlatformFileForTransit itunes_library_file); |
93 | 95 |
94 void OnParsePicasaPMPDatabase( | 96 void OnParsePicasaPMPDatabase( |
95 const picasa::AlbumTableFilesForTransit& album_table_files); | 97 const picasa::AlbumTableFilesForTransit& album_table_files); |
96 | 98 |
97 void OnIndexPicasaAlbumsContents( | 99 void OnIndexPicasaAlbumsContents( |
98 const picasa::AlbumUIDSet& album_uids, | 100 const picasa::AlbumUIDSet& album_uids, |
99 const std::vector<picasa::FolderINIContents>& folders_inis); | 101 const std::vector<picasa::FolderINIContents>& folders_inis); |
100 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 102 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
101 | 103 |
102 typedef ScopedVector<UtilityMessageHandler> Handlers; | 104 typedef ScopedVector<UtilityMessageHandler> Handlers; |
103 Handlers handlers_; | 105 Handlers handlers_; |
104 | 106 |
105 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient); | 107 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient); |
106 }; | 108 }; |
107 | 109 |
108 } // namespace chrome | 110 } // namespace chrome |
109 | 111 |
110 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ | 112 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ |
OLD | NEW |