| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_SERVICE_PROCESS_SERVICE_PROCESS_CONTROL_H_ | 5 #ifndef CHROME_BROWSER_SERVICE_PROCESS_SERVICE_PROCESS_CONTROL_H_ |
| 6 #define CHROME_BROWSER_SERVICE_PROCESS_SERVICE_PROCESS_CONTROL_H_ | 6 #define CHROME_BROWSER_SERVICE_PROCESS_SERVICE_PROCESS_CONTROL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 SERVICE_EVENT_CHANNEL_ERROR, | 60 SERVICE_EVENT_CHANNEL_ERROR, |
| 61 SERVICE_EVENT_INFO_REQUEST, | 61 SERVICE_EVENT_INFO_REQUEST, |
| 62 SERVICE_EVENT_INFO_REPLY, | 62 SERVICE_EVENT_INFO_REPLY, |
| 63 SERVICE_EVENT_HISTOGRAMS_REQUEST, | 63 SERVICE_EVENT_HISTOGRAMS_REQUEST, |
| 64 SERVICE_EVENT_HISTOGRAMS_REPLY, | 64 SERVICE_EVENT_HISTOGRAMS_REPLY, |
| 65 SERVICE_PRINTERS_REQUEST, | 65 SERVICE_PRINTERS_REQUEST, |
| 66 SERVICE_PRINTERS_REPLY, | 66 SERVICE_PRINTERS_REPLY, |
| 67 SERVICE_EVENT_MAX, | 67 SERVICE_EVENT_MAX, |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 typedef IDMap<ServiceProcessControl>::iterator iterator; | 70 using iterator = IDMap<ServiceProcessControl*>::iterator; |
| 71 typedef std::queue<IPC::Message> MessageQueue; | 71 using MessageQueue = std::queue<IPC::Message>; |
| 72 typedef base::Callback<void(const cloud_print::CloudPrintProxyInfo&)> | 72 using CloudPrintProxyInfoCallback = |
| 73 CloudPrintProxyInfoCallback; | 73 base::Callback<void(const cloud_print::CloudPrintProxyInfo&)>; |
| 74 typedef base::Callback<void(const std::vector<std::string>&)> | 74 using PrintersCallback = |
| 75 PrintersCallback; | 75 base::Callback<void(const std::vector<std::string>&)>; |
| 76 | 76 |
| 77 // Returns the singleton instance of this class. | 77 // Returns the singleton instance of this class. |
| 78 static ServiceProcessControl* GetInstance(); | 78 static ServiceProcessControl* GetInstance(); |
| 79 | 79 |
| 80 // Return true if this object is connected to the service. | 80 // Return true if this object is connected to the service. |
| 81 // Virtual for testing. | 81 // Virtual for testing. |
| 82 virtual bool IsConnected() const; | 82 virtual bool IsConnected() const; |
| 83 | 83 |
| 84 // If no service process is currently running, creates a new service process | 84 // If no service process is currently running, creates a new service process |
| 85 // and connects to it. If a service process is already running this method | 85 // and connects to it. If a service process is already running this method |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // the service process. | 228 // the service process. |
| 229 base::Closure histograms_callback_; | 229 base::Closure histograms_callback_; |
| 230 | 230 |
| 231 content::NotificationRegistrar registrar_; | 231 content::NotificationRegistrar registrar_; |
| 232 | 232 |
| 233 // Callback that gets invoked if service didn't reply in time. | 233 // Callback that gets invoked if service didn't reply in time. |
| 234 base::CancelableClosure histograms_timeout_callback_; | 234 base::CancelableClosure histograms_timeout_callback_; |
| 235 }; | 235 }; |
| 236 | 236 |
| 237 #endif // CHROME_BROWSER_SERVICE_PROCESS_SERVICE_PROCESS_CONTROL_H_ | 237 #endif // CHROME_BROWSER_SERVICE_PROCESS_SERVICE_PROCESS_CONTROL_H_ |
| OLD | NEW |