OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_UTILITY_THREAD_H_ | 5 #ifndef CHROME_UTILITY_UTILITY_THREAD_H_ |
6 #define CHROME_UTILITY_UTILITY_THREAD_H_ | 6 #define CHROME_UTILITY_UTILITY_THREAD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 20 matching lines...) Expand all Loading... |
31 UtilityThread(); | 31 UtilityThread(); |
32 virtual ~UtilityThread(); | 32 virtual ~UtilityThread(); |
33 | 33 |
34 // Returns the one utility thread. | 34 // Returns the one utility thread. |
35 static UtilityThread* current() { | 35 static UtilityThread* current() { |
36 return static_cast<UtilityThread*>(ChildThread::current()); | 36 return static_cast<UtilityThread*>(ChildThread::current()); |
37 } | 37 } |
38 | 38 |
39 private: | 39 private: |
40 // IPC messages | 40 // IPC messages |
41 virtual void OnControlMessageReceived(const IPC::Message& msg); | 41 virtual bool OnControlMessageReceived(const IPC::Message& msg); |
42 void OnUnpackExtension(const FilePath& extension_path); | 42 void OnUnpackExtension(const FilePath& extension_path); |
43 | 43 |
44 // IPC messages for web resource service. | 44 // IPC messages for web resource service. |
45 void OnUnpackWebResource(const std::string& resource_data); | 45 void OnUnpackWebResource(const std::string& resource_data); |
46 | 46 |
47 // IPC for parsing an extensions auto-update manifest xml file. | 47 // IPC for parsing an extensions auto-update manifest xml file. |
48 void OnParseUpdateManifest(const std::string& xml); | 48 void OnParseUpdateManifest(const std::string& xml); |
49 | 49 |
50 // IPC for decoding an image. | 50 // IPC for decoding an image. |
51 void OnDecodeImage(const std::vector<unsigned char>& encoded_data); | 51 void OnDecodeImage(const std::vector<unsigned char>& encoded_data); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // Releases the process if we are not (or no longer) in batch mode. | 93 // Releases the process if we are not (or no longer) in batch mode. |
94 void ReleaseProcessIfNeeded(); | 94 void ReleaseProcessIfNeeded(); |
95 | 95 |
96 // True when we're running in batch mode. | 96 // True when we're running in batch mode. |
97 bool batch_mode_; | 97 bool batch_mode_; |
98 | 98 |
99 DISALLOW_COPY_AND_ASSIGN(UtilityThread); | 99 DISALLOW_COPY_AND_ASSIGN(UtilityThread); |
100 }; | 100 }; |
101 | 101 |
102 #endif // CHROME_UTILITY_UTILITY_THREAD_H_ | 102 #endif // CHROME_UTILITY_UTILITY_THREAD_H_ |
OLD | NEW |