| Index: ui/viewer/viewer_ipc_server.h
|
| diff --git a/chrome/service/service_ipc_server.h b/ui/viewer/viewer_ipc_server.h
|
| similarity index 57%
|
| copy from chrome/service/service_ipc_server.h
|
| copy to ui/viewer/viewer_ipc_server.h
|
| index a4c75130978975c3fff9e152feee176ae856e167..8ab2bd048f487246d6b19c2babecb8bcecc639e6 100644
|
| --- a/chrome/service/service_ipc_server.h
|
| +++ b/ui/viewer/viewer_ipc_server.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_SERVICE_SERVICE_IPC_SERVER_H_
|
| -#define CHROME_SERVICE_SERVICE_IPC_SERVER_H_
|
| +#ifndef UI_VIEWER_VIEWER_IPC_SERVER_H_
|
| +#define UI_VIEWER_VIEWER_IPC_SERVER_H_
|
|
|
| #include <string>
|
|
|
| @@ -14,11 +14,11 @@
|
| #include "ipc/ipc_sync_message_filter.h"
|
| #include "ipc/ipc_sender.h"
|
|
|
| -// This class handles IPC commands for the service process.
|
| -class ServiceIPCServer : public IPC::Listener, public IPC::Sender {
|
| +// This class handles IPC commands for the Viewer process.
|
| +class ViewerIPCServer : public IPC::Listener, public IPC::Sender {
|
| public:
|
| - explicit ServiceIPCServer(const IPC::ChannelHandle& handle);
|
| - virtual ~ServiceIPCServer();
|
| + explicit ViewerIPCServer(const IPC::ChannelHandle& handle);
|
| + virtual ~ViewerIPCServer();
|
|
|
| bool Init();
|
|
|
| @@ -31,44 +31,27 @@ class ServiceIPCServer : public IPC::Listener, public IPC::Sender {
|
| // lifetime is less than the main thread.
|
| IPC::SyncMessageFilter* sync_message_filter() { return sync_message_filter_; }
|
|
|
| - bool is_client_connected() const { return client_connected_; }
|
| -
|
| -
|
| private:
|
| - friend class MockServiceIPCServer;
|
| -
|
| // IPC::Listener implementation.
|
| virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
|
| virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
|
| virtual void OnChannelError() OVERRIDE;
|
|
|
| // IPC message handlers.
|
| - void OnEnableCloudPrintProxy(const std::string& lsid);
|
| - void OnEnableCloudPrintProxyWithRobot(
|
| - const std::string& robot_auth_code,
|
| - const std::string& robot_email,
|
| - const std::string& user_email);
|
| - void OnGetCloudPrintProxyInfo();
|
| - void OnDisableCloudPrintProxy();
|
| - void OnEnableVirtualDriver();
|
| - void OnDisableVirtualDriver();
|
| -
|
| - void OnShutdown();
|
| - void OnUpdateAvailable();
|
| + void OnPbufferHandle(const std::string& todo);
|
|
|
| // Helper method to create the sync channel.
|
| void CreateChannel();
|
|
|
| + bool client_connected_;
|
| +
|
| IPC::ChannelHandle channel_handle_;
|
| scoped_ptr<IPC::SyncChannel> channel_;
|
| - // Indicates whether a client is currently connected to the channel.
|
| - bool client_connected_;
|
|
|
| // Allows threads other than the main thread to send sync messages.
|
| scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_;
|
|
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(ServiceIPCServer);
|
| + DISALLOW_COPY_AND_ASSIGN(ViewerIPCServer);
|
| };
|
|
|
| -#endif // CHROME_SERVICE_SERVICE_IPC_SERVER_H_
|
| +#endif // UI_VIEWER_VIEWER_IPC_SERVER_H_
|
|
|