Add a UsbService::Observer function for cleanup actions.
[chromium-blink-merge.git] / extensions / utility / utility_handler.h
blob89a81d6e78d8a9199e04f4b637d9c37c70a539a8
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 OnUnpackExtension(const base::FilePath& extension_path,
37 const std::string& extension_id,
38 int location, int creation_flags);
40 DISALLOW_COPY_AND_ASSIGN(UtilityHandler);
43 } // namespace extensions
45 #endif // EXTENSIONS_UTILITY_UTILITY_HANDLER_