OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_SERVICE_PROCESS_CONTROL_H_ | 5 #ifndef CHROME_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_ |
6 #define CHROME_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_ | 6 #define CHROME_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // and connected to it. | 70 // and connected to it. |
71 // |failure_task| is called when we failed to connect to the service process. | 71 // |failure_task| is called when we failed to connect to the service process. |
72 // It is OK to pass the same value for |success_task| and |failure_task|. In | 72 // It is OK to pass the same value for |success_task| and |failure_task|. In |
73 // this case, the task is invoked on success or failure. | 73 // this case, the task is invoked on success or failure. |
74 // Note that if we are already connected to service process then | 74 // Note that if we are already connected to service process then |
75 // |success_task| can be invoked in the context of the Launch call. | 75 // |success_task| can be invoked in the context of the Launch call. |
76 // Takes ownership of |success_task| and |failure_task|. | 76 // Takes ownership of |success_task| and |failure_task|. |
77 void Launch(Task* success_task, Task* failure_task); | 77 void Launch(Task* success_task, Task* failure_task); |
78 | 78 |
79 // IPC::Channel::Listener implementation. | 79 // IPC::Channel::Listener implementation. |
80 virtual void OnMessageReceived(const IPC::Message& message); | 80 virtual bool OnMessageReceived(const IPC::Message& message); |
81 virtual void OnChannelConnected(int32 peer_pid); | 81 virtual void OnChannelConnected(int32 peer_pid); |
82 virtual void OnChannelError(); | 82 virtual void OnChannelError(); |
83 | 83 |
84 // IPC::Channel::Sender implementation | 84 // IPC::Channel::Sender implementation |
85 virtual bool Send(IPC::Message* message); | 85 virtual bool Send(IPC::Message* message); |
86 | 86 |
87 // NotificationObserver implementation. | 87 // NotificationObserver implementation. |
88 virtual void Observe(NotificationType type, | 88 virtual void Observe(NotificationType type, |
89 const NotificationSource& source, | 89 const NotificationSource& source, |
90 const NotificationDetails& details); | 90 const NotificationDetails& details); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 scoped_ptr<Callback2<bool, std::string>::Type> cloud_print_status_callback_; | 163 scoped_ptr<Callback2<bool, std::string>::Type> cloud_print_status_callback_; |
164 scoped_ptr<GetRemotingHostStatusCallback> remoting_host_status_callback_; | 164 scoped_ptr<GetRemotingHostStatusCallback> remoting_host_status_callback_; |
165 | 165 |
166 // Handler for messages from service process. | 166 // Handler for messages from service process. |
167 MessageHandler* message_handler_; | 167 MessageHandler* message_handler_; |
168 | 168 |
169 NotificationRegistrar registrar_; | 169 NotificationRegistrar registrar_; |
170 }; | 170 }; |
171 | 171 |
172 #endif // CHROME_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_ | 172 #endif // CHROME_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_ |
OLD | NEW |