Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / extensions / utility / utility_handler.h
blobb32707f921a82c616d9e77eecc42d8e367d23680
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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_UTILITY_UTILITY_HANDLER_
6 #define EXTENSIONS_UTILITY_UTILITY_HANDLER_
8 #include <string>
10 #include "base/callback.h"
11 #include "base/macros.h"
13 namespace base {
14 class FilePath;
17 namespace IPC {
18 class Message;
21 namespace extensions {
23 // A handler for extensions-related IPC from within utility processes.
24 class UtilityHandler {
25 public:
26 UtilityHandler();
27 ~UtilityHandler();
29 static void UtilityThreadStarted();
31 bool OnMessageReceived(const IPC::Message& message);
33 private:
34 // IPC message handlers.
35 void OnParseUpdateManifest(const std::string& xml);
36 void OnUnzipToDir(const base::FilePath& zip_path, const base::FilePath& dir);
37 void OnUnpackExtension(const base::FilePath& directory_path,
38 const std::string& extension_id,
39 int location,
40 int creation_flags);
42 DISALLOW_COPY_AND_ASSIGN(UtilityHandler);
45 } // namespace extensions
47 #endif // EXTENSIONS_UTILITY_UTILITY_HANDLER_