Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: chrome/service/service_ipc_server.h

Issue 11037005: New Cloud Print Private API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy.cc ('k') | chrome/service/service_ipc_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SERVICE_SERVICE_IPC_SERVER_H_ 5 #ifndef CHROME_SERVICE_SERVICE_IPC_SERVER_H_
6 #define CHROME_SERVICE_SERVICE_IPC_SERVER_H_ 6 #define CHROME_SERVICE_SERVICE_IPC_SERVER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector>
9 10
10 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
11 #include "ipc/ipc_channel_handle.h" 12 #include "ipc/ipc_channel_handle.h"
12 #include "ipc/ipc_listener.h" 13 #include "ipc/ipc_listener.h"
13 #include "ipc/ipc_sync_channel.h" 14 #include "ipc/ipc_sync_channel.h"
14 #include "ipc/ipc_sync_message_filter.h" 15 #include "ipc/ipc_sync_message_filter.h"
15 #include "ipc/ipc_sender.h" 16 #include "ipc/ipc_sender.h"
16 17
17 // This class handles IPC commands for the service process. 18 // This class handles IPC commands for the service process.
18 class ServiceIPCServer : public IPC::Listener, public IPC::Sender { 19 class ServiceIPCServer : public IPC::Listener, public IPC::Sender {
(...skipping 21 matching lines...) Expand all
40 // IPC::Listener implementation. 41 // IPC::Listener implementation.
41 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 42 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
42 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 43 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
43 virtual void OnChannelError() OVERRIDE; 44 virtual void OnChannelError() OVERRIDE;
44 45
45 // IPC message handlers. 46 // IPC message handlers.
46 void OnEnableCloudPrintProxy(const std::string& lsid); 47 void OnEnableCloudPrintProxy(const std::string& lsid);
47 void OnEnableCloudPrintProxyWithRobot( 48 void OnEnableCloudPrintProxyWithRobot(
48 const std::string& robot_auth_code, 49 const std::string& robot_auth_code,
49 const std::string& robot_email, 50 const std::string& robot_email,
50 const std::string& user_email); 51 const std::string& user_email,
52 bool connect_new_printers,
53 const std::vector<std::string>& printer_blacklist);
51 void OnGetCloudPrintProxyInfo(); 54 void OnGetCloudPrintProxyInfo();
52 void OnDisableCloudPrintProxy(); 55 void OnDisableCloudPrintProxy();
53 56
54 void OnShutdown(); 57 void OnShutdown();
55 void OnUpdateAvailable(); 58 void OnUpdateAvailable();
56 59
57 // Helper method to create the sync channel. 60 // Helper method to create the sync channel.
58 void CreateChannel(); 61 void CreateChannel();
59 62
60 IPC::ChannelHandle channel_handle_; 63 IPC::ChannelHandle channel_handle_;
61 scoped_ptr<IPC::SyncChannel> channel_; 64 scoped_ptr<IPC::SyncChannel> channel_;
62 // Indicates whether a client is currently connected to the channel. 65 // Indicates whether a client is currently connected to the channel.
63 bool client_connected_; 66 bool client_connected_;
64 67
65 // Allows threads other than the main thread to send sync messages. 68 // Allows threads other than the main thread to send sync messages.
66 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; 69 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_;
67 70
68 71
69 DISALLOW_COPY_AND_ASSIGN(ServiceIPCServer); 72 DISALLOW_COPY_AND_ASSIGN(ServiceIPCServer);
70 }; 73 };
71 74
72 #endif // CHROME_SERVICE_SERVICE_IPC_SERVER_H_ 75 #endif // CHROME_SERVICE_SERVICE_IPC_SERVER_H_
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy.cc ('k') | chrome/service/service_ipc_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698