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

Side by Side Diff: chrome/browser/nacl_host/nacl_process_host.h

Issue 8774040: Don't make classes derive from ChildProcessHost, and instead have them use it through composition... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ 5 #ifndef CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_
6 #define CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ 6 #define CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 25 matching lines...) Expand all
36 int socket_count, 36 int socket_count,
37 IPC::Message* reply_msg); 37 IPC::Message* reply_msg);
38 38
39 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 39 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
40 40
41 void OnProcessLaunchedByBroker(base::ProcessHandle handle); 41 void OnProcessLaunchedByBroker(base::ProcessHandle handle);
42 42
43 protected: 43 protected:
44 virtual base::TerminationStatus GetChildTerminationStatus( 44 virtual base::TerminationStatus GetChildTerminationStatus(
45 int* exit_code) OVERRIDE; 45 int* exit_code) OVERRIDE;
46 virtual void OnChildDied() OVERRIDE;
47 46
48 private: 47 private:
49 // Internal class that holds the nacl::Handle objecs so that 48 // Internal class that holds the nacl::Handle objecs so that
50 // nacl_process_host.h doesn't include NaCl headers. Needed since it's 49 // nacl_process_host.h doesn't include NaCl headers. Needed since it's
51 // included by src\content, which can't depend on the NaCl gyp file because it 50 // included by src\content, which can't depend on the NaCl gyp file because it
52 // depends on chrome.gyp (circular dependency). 51 // depends on chrome.gyp (circular dependency).
53 struct NaClInternal; 52 struct NaClInternal;
54 53
55 bool LaunchSelLdr(); 54 bool LaunchSelLdr();
56 55
57 virtual void OnProcessLaunched() OVERRIDE; 56 virtual void OnProcessLaunched() OVERRIDE;
58 57
59 void IrtReady(); 58 void IrtReady();
60 void SendStart(base::PlatformFile irt_file); 59 void SendStart(base::PlatformFile irt_file);
61 60
62 virtual bool CanShutdown() OVERRIDE;
63
64 private: 61 private:
65 // The ChromeRenderMessageFilter that requested this NaCl process. We use 62 // The ChromeRenderMessageFilter that requested this NaCl process. We use
66 // this for sending the reply once the process has started. 63 // this for sending the reply once the process has started.
67 scoped_refptr<ChromeRenderMessageFilter> chrome_render_message_filter_; 64 scoped_refptr<ChromeRenderMessageFilter> chrome_render_message_filter_;
68 65
69 // The reply message to send. 66 // The reply message to send.
70 IPC::Message* reply_msg_; 67 IPC::Message* reply_msg_;
71 68
72 // Socket pairs for the NaCl process and renderer. 69 // Socket pairs for the NaCl process and renderer.
73 scoped_ptr<NaClInternal> internal_; 70 scoped_ptr<NaClInternal> internal_;
74 71
75 base::WeakPtrFactory<NaClProcessHost> weak_factory_; 72 base::WeakPtrFactory<NaClProcessHost> weak_factory_;
76 73
77 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); 74 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost);
78 }; 75 };
79 76
80 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ 77 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698