| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSIONS_EXTENSIONS_HANDLER_H_ | 5 #ifndef CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_ |
| 6 #define CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_ | 6 #define CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/base64.h" | 8 #include "base/base64.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 namespace extensions { | 23 namespace extensions { |
| 24 | 24 |
| 25 // Dispatches IPCs for Chrome extensions utility messages. | 25 // Dispatches IPCs for Chrome extensions utility messages. |
| 26 class ExtensionsHandler : public UtilityMessageHandler { | 26 class ExtensionsHandler : public UtilityMessageHandler { |
| 27 public: | 27 public: |
| 28 ExtensionsHandler(); | 28 ExtensionsHandler(); |
| 29 ~ExtensionsHandler() override; | 29 ~ExtensionsHandler() override; |
| 30 | 30 |
| 31 static void PreSandboxStartup(); | 31 static void PreSandboxStartup(); |
| 32 static void UtilityThreadStarted(); | |
| 33 | 32 |
| 34 // UtilityMessageHandler: | 33 // UtilityMessageHandler: |
| 35 bool OnMessageReceived(const IPC::Message& message) override; | 34 bool OnMessageReceived(const IPC::Message& message) override; |
| 36 | 35 |
| 37 private: | 36 private: |
| 38 // IPC message handlers. | 37 // IPC message handlers. |
| 39 void OnUnpackExtension(const base::FilePath& extension_path, | |
| 40 const std::string& extension_id, | |
| 41 int location, int creation_flags); | |
| 42 void OnUnzipToDir(const base::FilePath& zip_path, const base::FilePath& dir); | 38 void OnUnzipToDir(const base::FilePath& zip_path, const base::FilePath& dir); |
| 43 void OnDecodeImageBase64(const std::string& encoded_data); | 39 void OnDecodeImageBase64(const std::string& encoded_data); |
| 44 void OnCheckMediaFile(int64 milliseconds_of_decoding, | 40 void OnCheckMediaFile(int64 milliseconds_of_decoding, |
| 45 const IPC::PlatformFileForTransit& media_file); | 41 const IPC::PlatformFileForTransit& media_file); |
| 46 | 42 |
| 47 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
| 48 void OnParseITunesPrefXml(const std::string& itunes_xml_data); | 44 void OnParseITunesPrefXml(const std::string& itunes_xml_data); |
| 49 #endif // defined(OS_WIN) | 45 #endif // defined(OS_WIN) |
| 50 | 46 |
| 51 #if defined(OS_MACOSX) | 47 #if defined(OS_MACOSX) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 70 #endif // defined(OS_WIN) | 66 #endif // defined(OS_WIN) |
| 71 | 67 |
| 72 UtilityHandler utility_handler_; | 68 UtilityHandler utility_handler_; |
| 73 | 69 |
| 74 DISALLOW_COPY_AND_ASSIGN(ExtensionsHandler); | 70 DISALLOW_COPY_AND_ASSIGN(ExtensionsHandler); |
| 75 }; | 71 }; |
| 76 | 72 |
| 77 } // namespace extensions | 73 } // namespace extensions |
| 78 | 74 |
| 79 #endif // CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_ | 75 #endif // CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_ |
| OLD | NEW |