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..d138072675f83875c08c48dab6e2b4cabb9cf810 |
--- /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 "base/memory/weak_ptr.h" |
+#include "base/threading/non_thread_safe.h" |
+#include "ipc/ipc_listener.h" |
+#include "ipc/ipc_sender.h" |
+ |
+namespace IPC { |
+class ChannelProxy; |
+} |
+ |
+namespace chrome { |
+ |
+class ViewerProcessHost : public IPC::Listener, |
+ public IPC::Sender, |
+ public base::NonThreadSafe { |
+ 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; |
+ |
+ private: |
+ void OnSetTargetSurface(uint32 target_surface); |
+ |
+ scoped_ptr<IPC::ChannelProxy> channel_; |
+ |
+ base::WeakPtrFactory<ViewerProcessHost> weak_factory_; |
+}; |
+ |
+} // namespace chrome |
+ |
+#endif // CHROME_BROWSER_VIEWER_VIEWER_PROCESS_HOST_H_ |