OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_NACL_RENDERER_MANIFEST_SERVICE_CHANNEL_H_ | 5 #ifndef COMPONENTS_NACL_RENDERER_MANIFEST_SERVICE_CHANNEL_H_ |
6 #define COMPONENTS_NACL_RENDERER_MANIFEST_SERVICE_CHANNEL_H_ | 6 #define COMPONENTS_NACL_RENDERER_MANIFEST_SERVICE_CHANNEL_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 ManifestServiceChannel( | 48 ManifestServiceChannel( |
49 const IPC::ChannelHandle& handle, | 49 const IPC::ChannelHandle& handle, |
50 const base::Callback<void(int32_t)>& connected_callback, | 50 const base::Callback<void(int32_t)>& connected_callback, |
51 scoped_ptr<Delegate> delegate, | 51 scoped_ptr<Delegate> delegate, |
52 base::WaitableEvent* waitable_event); | 52 base::WaitableEvent* waitable_event); |
53 virtual ~ManifestServiceChannel(); | 53 virtual ~ManifestServiceChannel(); |
54 | 54 |
55 void Send(IPC::Message* message); | 55 void Send(IPC::Message* message); |
56 | 56 |
57 // Listener implementation. | 57 // Listener implementation. |
58 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 58 virtual bool OnMessageReceived(const IPC::Message& message) override; |
59 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 59 virtual void OnChannelConnected(int32 peer_pid) override; |
60 virtual void OnChannelError() OVERRIDE; | 60 virtual void OnChannelError() override; |
61 | 61 |
62 private: | 62 private: |
63 void OnStartupInitializationComplete(); | 63 void OnStartupInitializationComplete(); |
64 void OnOpenResource(const std::string& key, IPC::Message* reply); | 64 void OnOpenResource(const std::string& key, IPC::Message* reply); |
65 void DidOpenResource(IPC::Message* reply, | 65 void DidOpenResource(IPC::Message* reply, |
66 base::File file, | 66 base::File file, |
67 uint64_t token_lo, | 67 uint64_t token_lo, |
68 uint64_t token_hi); | 68 uint64_t token_hi); |
69 base::Callback<void(int32_t)> connected_callback_; | 69 base::Callback<void(int32_t)> connected_callback_; |
70 scoped_ptr<Delegate> delegate_; | 70 scoped_ptr<Delegate> delegate_; |
71 scoped_ptr<IPC::SyncChannel> channel_; | 71 scoped_ptr<IPC::SyncChannel> channel_; |
72 | 72 |
73 base::ProcessId peer_pid_; | 73 base::ProcessId peer_pid_; |
74 | 74 |
75 // Note: This should remain the last member so it'll be destroyed and | 75 // Note: This should remain the last member so it'll be destroyed and |
76 // invalidate the weak pointers before any other members are destroyed. | 76 // invalidate the weak pointers before any other members are destroyed. |
77 base::WeakPtrFactory<ManifestServiceChannel> weak_ptr_factory_; | 77 base::WeakPtrFactory<ManifestServiceChannel> weak_ptr_factory_; |
78 | 78 |
79 DISALLOW_COPY_AND_ASSIGN(ManifestServiceChannel); | 79 DISALLOW_COPY_AND_ASSIGN(ManifestServiceChannel); |
80 }; | 80 }; |
81 | 81 |
82 } // namespace nacl | 82 } // namespace nacl |
83 | 83 |
84 #endif // COMPONENTS_NACL_RENDERER_MANIFEST_SERVICE_CHANNEL_H_ | 84 #endif // COMPONENTS_NACL_RENDERER_MANIFEST_SERVICE_CHANNEL_H_ |
OLD | NEW |