Index: chrome/browser/viewer/viewer_process_host.h |
diff --git a/chrome/browser/viewer/viewer_process_host.h b/chrome/browser/viewer/viewer_process_host.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b491a2dca70749be186af401054c4addccb0f488 |
--- /dev/null |
+++ b/chrome/browser/viewer/viewer_process_host.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_VIEWER_VIEWER_PROCESS_HOST_H_ |
+#define CHROME_BROWSER_VIEWER_VIEWER_PROCESS_HOST_H_ |
+ |
+#include "base/memory/scoped_ptr.h" |
+#include "ipc/ipc_listener.h" |
+#include "ipc/ipc_sender.h" |
+ |
+namespace IPC { |
+class Channel; |
+struct ChannelHandle; |
jam
2012/09/27 21:18:40
nit: not needed
scottmg
2012/09/28 04:50:45
Done.
|
+} |
+ |
+namespace viewer { |
jam
2012/09/27 21:18:40
nit: just keep everything in the "chrome" namespac
scottmg
2012/09/28 04:50:45
Done.
|
+ |
+class ViewerProcessHost : public IPC::Listener, |
+ public IPC::Sender { |
+ public: |
+ ViewerProcessHost(); |
+ virtual ~ViewerProcessHost(); |
+ |
+ // IPC::Sender implementation. |
+ virtual bool Send(IPC::Message* msg) OVERRIDE; |
+ |
+ // IPC::Listener implementation. |
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
+ virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
+ virtual void OnChannelError() OVERRIDE; |
+ |
+ private: |
+ void OnSetTargetSurface(uint32 target_surface); |
+ |
+ void CreateChannel(); |
+ |
+ scoped_ptr<IPC::Channel> channel_; |
+}; |
+ |
+} // namespace viewer |
+ |
+#endif // CHROME_BROWSER_VIEWER_VIEWER_PROCESS_HOST_H_ |