OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_VIEWER_VIEWER_PROCESS_HOST_H_ |
| 6 #define CHROME_BROWSER_VIEWER_VIEWER_PROCESS_HOST_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/threading/non_thread_safe.h" |
| 11 #include "ipc/ipc_listener.h" |
| 12 #include "ipc/ipc_sender.h" |
| 13 |
| 14 namespace IPC { |
| 15 class ChannelProxy; |
| 16 } |
| 17 |
| 18 namespace chrome { |
| 19 |
| 20 class ViewerProcessHost : public IPC::Listener, |
| 21 public IPC::Sender, |
| 22 public base::NonThreadSafe { |
| 23 public: |
| 24 ViewerProcessHost(); |
| 25 virtual ~ViewerProcessHost(); |
| 26 |
| 27 // IPC::Sender implementation. |
| 28 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 29 |
| 30 // IPC::Listener implementation. |
| 31 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 32 |
| 33 private: |
| 34 void OnSetTargetSurface(uint32 target_surface); |
| 35 |
| 36 scoped_ptr<IPC::ChannelProxy> channel_; |
| 37 |
| 38 base::WeakPtrFactory<ViewerProcessHost> weak_factory_; |
| 39 }; |
| 40 |
| 41 } // namespace chrome |
| 42 |
| 43 #endif // CHROME_BROWSER_VIEWER_VIEWER_PROCESS_HOST_H_ |
OLD | NEW |