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 EXTENSIONS_UTILITY_UTILITY_HANDLER_ | 5 #ifndef EXTENSIONS_UTILITY_UTILITY_HANDLER_ |
6 #define EXTENSIONS_UTILITY_UTILITY_HANDLER_ | 6 #define EXTENSIONS_UTILITY_UTILITY_HANDLER_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
| 10 #include "base/callback.h" |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 | 12 |
| 13 namespace base { |
| 14 class FilePath; |
| 15 } |
| 16 |
12 namespace IPC { | 17 namespace IPC { |
13 class Message; | 18 class Message; |
14 } | 19 } |
15 | 20 |
16 namespace extensions { | 21 namespace extensions { |
17 | 22 |
18 // A handler for extensions-related IPC from within utility processes. | 23 // A handler for extensions-related IPC from within utility processes. |
19 class UtilityHandler { | 24 class UtilityHandler { |
20 public: | 25 public: |
21 UtilityHandler(); | 26 UtilityHandler(); |
22 ~UtilityHandler(); | 27 ~UtilityHandler(); |
23 | 28 |
24 static void UtilityThreadStarted(); | 29 static void UtilityThreadStarted(); |
25 | 30 |
26 bool OnMessageReceived(const IPC::Message& message); | 31 bool OnMessageReceived(const IPC::Message& message); |
27 | 32 |
28 private: | 33 private: |
29 // IPC message handlers. | 34 // IPC message handlers. |
30 void OnParseUpdateManifest(const std::string& xml); | 35 void OnParseUpdateManifest(const std::string& xml); |
| 36 void OnUnpackExtension(const base::FilePath& extension_path, |
| 37 const std::string& extension_id, |
| 38 int location, int creation_flags); |
31 | 39 |
32 DISALLOW_COPY_AND_ASSIGN(UtilityHandler); | 40 DISALLOW_COPY_AND_ASSIGN(UtilityHandler); |
33 }; | 41 }; |
34 | 42 |
35 } // namespace extensions | 43 } // namespace extensions |
36 | 44 |
37 #endif // EXTENSIONS_UTILITY_UTILITY_HANDLER_ | 45 #endif // EXTENSIONS_UTILITY_UTILITY_HANDLER_ |
OLD | NEW |