Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Side by Side Diff: components/nacl/renderer/manifest_service_channel.h

Issue 1184523003: attachment broker wip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor comments. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/process/process.h" 13 #include "base/process/process.h"
14 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
15 #include "ipc/ipc_listener.h" 15 #include "ipc/ipc_listener.h"
16 16
17 namespace base { 17 namespace base {
18 class WaitableEvent; 18 class WaitableEvent;
19 } // namespace base 19 } // namespace base
20 20
21 namespace IPC { 21 namespace IPC {
22 class AttachmentBroker;
22 struct ChannelHandle; 23 struct ChannelHandle;
23 class Message; 24 class Message;
24 class SyncChannel; 25 class SyncChannel;
25 } // namespace IPC 26 } // namespace IPC
26 27
27 namespace nacl { 28 namespace nacl {
28 29
29 class ManifestServiceChannel : public IPC::Listener { 30 class ManifestServiceChannel : public IPC::Listener {
30 public: 31 public:
31 typedef base::Callback<void(base::File, uint64_t, uint64_t)> 32 typedef base::Callback<void(base::File, uint64_t, uint64_t)>
(...skipping 10 matching lines...) Expand all
42 // Upon completion, callback is invoked with the file. 43 // Upon completion, callback is invoked with the file.
43 virtual void OpenResource( 44 virtual void OpenResource(
44 const std::string& key, 45 const std::string& key,
45 const OpenResourceCallback& callback) = 0; 46 const OpenResourceCallback& callback) = 0;
46 }; 47 };
47 48
48 ManifestServiceChannel( 49 ManifestServiceChannel(
49 const IPC::ChannelHandle& handle, 50 const IPC::ChannelHandle& handle,
50 const base::Callback<void(int32_t)>& connected_callback, 51 const base::Callback<void(int32_t)>& connected_callback,
51 scoped_ptr<Delegate> delegate, 52 scoped_ptr<Delegate> delegate,
52 base::WaitableEvent* waitable_event); 53 base::WaitableEvent* waitable_event,
54 IPC::AttachmentBroker* broker);
53 ~ManifestServiceChannel() override; 55 ~ManifestServiceChannel() override;
54 56
55 void Send(IPC::Message* message); 57 void Send(IPC::Message* message);
56 58
57 // Listener implementation. 59 // Listener implementation.
58 bool OnMessageReceived(const IPC::Message& message) override; 60 bool OnMessageReceived(const IPC::Message& message) override;
59 void OnChannelConnected(int32 peer_pid) override; 61 void OnChannelConnected(int32 peer_pid) override;
60 void OnChannelError() override; 62 void OnChannelError() override;
61 63
62 private: 64 private:
(...skipping 12 matching lines...) Expand all
75 // Note: This should remain the last member so it'll be destroyed and 77 // Note: This should remain the last member so it'll be destroyed and
76 // invalidate the weak pointers before any other members are destroyed. 78 // invalidate the weak pointers before any other members are destroyed.
77 base::WeakPtrFactory<ManifestServiceChannel> weak_ptr_factory_; 79 base::WeakPtrFactory<ManifestServiceChannel> weak_ptr_factory_;
78 80
79 DISALLOW_COPY_AND_ASSIGN(ManifestServiceChannel); 81 DISALLOW_COPY_AND_ASSIGN(ManifestServiceChannel);
80 }; 82 };
81 83
82 } // namespace nacl 84 } // namespace nacl
83 85
84 #endif // COMPONENTS_NACL_RENDERER_MANIFEST_SERVICE_CHANNEL_H_ 86 #endif // COMPONENTS_NACL_RENDERER_MANIFEST_SERVICE_CHANNEL_H_
OLDNEW
« no previous file with comments | « components/nacl/loader/nacl_trusted_listener.cc ('k') | components/nacl/renderer/manifest_service_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698