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

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

Issue 424893003: Pepper: Move NaCl fatal logging to Chrome IPC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for dmichael Created 6 years, 4 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 | Annotate | Revision Log
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_TRUSTED_PLUGIN_CHANNEL_H_ 5 #ifndef COMPONENTS_NACL_RENDERER_TRUSTED_PLUGIN_CHANNEL_H_
6 #define COMPONENTS_NACL_RENDERER_TRUSTED_PLUGIN_CHANNEL_H_ 6 #define COMPONENTS_NACL_RENDERER_TRUSTED_PLUGIN_CHANNEL_H_
7 7
8 #include <string>
8 #include "base/callback.h" 9 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
10 #include "ipc/ipc_listener.h" 11 #include "ipc/ipc_listener.h"
12 #include "ppapi/c/pp_instance.h"
11 13
12 namespace base { 14 namespace base {
13 class WaitableEvent; 15 class WaitableEvent;
14 } // namespace base 16 } // namespace base
15 17
16 namespace IPC { 18 namespace IPC {
17 class ChannelProxy; 19 class ChannelProxy;
18 struct ChannelHandle; 20 struct ChannelHandle;
19 class Message; 21 class Message;
20 } // namespace IPC 22 } // namespace IPC
21 23
22 namespace nacl { 24 namespace nacl {
23 25
24 class TrustedPluginChannel : public IPC::Listener { 26 class TrustedPluginChannel : public IPC::Listener {
25 public: 27 public:
26 explicit TrustedPluginChannel(const IPC::ChannelHandle& handle); 28 explicit TrustedPluginChannel(PP_Instance instance,
29 const IPC::ChannelHandle& handle);
27 virtual ~TrustedPluginChannel(); 30 virtual ~TrustedPluginChannel();
28 31
29 bool Send(IPC::Message* message); 32 bool Send(IPC::Message* message);
30 33
31 // Listener implementation. 34 // Listener implementation.
32 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 35 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
33 36
37 void OnFatalLogReceived(const std::string& log);
38
34 private: 39 private:
40 PP_Instance instance_;
35 scoped_ptr<IPC::ChannelProxy> channel_proxy_; 41 scoped_ptr<IPC::ChannelProxy> channel_proxy_;
36 42
37 DISALLOW_COPY_AND_ASSIGN(TrustedPluginChannel); 43 DISALLOW_COPY_AND_ASSIGN(TrustedPluginChannel);
38 }; 44 };
39 45
40 } // namespace nacl 46 } // namespace nacl
41 47
42 #endif // COMPONENTS_NACL_RENDERER_TRUSTED_PLUGIN_CHANNEL_H_ 48 #endif // COMPONENTS_NACL_RENDERER_TRUSTED_PLUGIN_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698