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

Side by Side Diff: content/browser/browser_child_process_host_impl.h

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « content/browser/bootstrap_sandbox_mac.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_
6 #define CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 27 matching lines...) Expand all
38 : public BrowserChildProcessHost, 38 : public BrowserChildProcessHost,
39 public NON_EXPORTED_BASE(ChildProcessHostDelegate), 39 public NON_EXPORTED_BASE(ChildProcessHostDelegate),
40 #if defined(OS_WIN) 40 #if defined(OS_WIN)
41 public base::win::ObjectWatcher::Delegate, 41 public base::win::ObjectWatcher::Delegate,
42 #endif 42 #endif
43 public ChildProcessLauncher::Client { 43 public ChildProcessLauncher::Client {
44 public: 44 public:
45 BrowserChildProcessHostImpl( 45 BrowserChildProcessHostImpl(
46 int process_type, 46 int process_type,
47 BrowserChildProcessHostDelegate* delegate); 47 BrowserChildProcessHostDelegate* delegate);
48 virtual ~BrowserChildProcessHostImpl(); 48 ~BrowserChildProcessHostImpl() override;
49 49
50 // Terminates all child processes and deletes each BrowserChildProcessHost 50 // Terminates all child processes and deletes each BrowserChildProcessHost
51 // instance. 51 // instance.
52 static void TerminateAll(); 52 static void TerminateAll();
53 53
54 // BrowserChildProcessHost implementation: 54 // BrowserChildProcessHost implementation:
55 virtual bool Send(IPC::Message* message) override; 55 bool Send(IPC::Message* message) override;
56 virtual void Launch( 56 void Launch(SandboxedProcessLauncherDelegate* delegate,
57 SandboxedProcessLauncherDelegate* delegate, 57 base::CommandLine* cmd_line) override;
58 base::CommandLine* cmd_line) override; 58 const ChildProcessData& GetData() const override;
59 virtual const ChildProcessData& GetData() const override; 59 ChildProcessHost* GetHost() const override;
60 virtual ChildProcessHost* GetHost() const override; 60 base::TerminationStatus GetTerminationStatus(bool known_dead,
61 virtual base::TerminationStatus GetTerminationStatus( 61 int* exit_code) override;
62 bool known_dead, int* exit_code) override; 62 void SetName(const base::string16& name) override;
63 virtual void SetName(const base::string16& name) override; 63 void SetHandle(base::ProcessHandle handle) override;
64 virtual void SetHandle(base::ProcessHandle handle) override;
65 64
66 // ChildProcessHostDelegate implementation: 65 // ChildProcessHostDelegate implementation:
67 virtual bool CanShutdown() override; 66 bool CanShutdown() override;
68 virtual void OnChildDisconnected() override; 67 void OnChildDisconnected() override;
69 virtual base::ProcessHandle GetHandle() const override; 68 base::ProcessHandle GetHandle() const override;
70 virtual bool OnMessageReceived(const IPC::Message& message) override; 69 bool OnMessageReceived(const IPC::Message& message) override;
71 virtual void OnChannelConnected(int32 peer_pid) override; 70 void OnChannelConnected(int32 peer_pid) override;
72 virtual void OnChannelError() override; 71 void OnChannelError() override;
73 virtual void OnBadMessageReceived(const IPC::Message& message) override; 72 void OnBadMessageReceived(const IPC::Message& message) override;
74 73
75 // Removes this host from the host list. Calls ChildProcessHost::ForceShutdown 74 // Removes this host from the host list. Calls ChildProcessHost::ForceShutdown
76 void ForceShutdown(); 75 void ForceShutdown();
77 76
78 // Callers can reduce the BrowserChildProcess' priority. 77 // Callers can reduce the BrowserChildProcess' priority.
79 void SetBackgrounded(bool backgrounded); 78 void SetBackgrounded(bool backgrounded);
80 79
81 // Controls whether the child process should be terminated on browser 80 // Controls whether the child process should be terminated on browser
82 // shutdown. Default is to always terminate. 81 // shutdown. Default is to always terminate.
83 void SetTerminateChildOnShutdown(bool terminate_on_shutdown); 82 void SetTerminateChildOnShutdown(bool terminate_on_shutdown);
(...skipping 12 matching lines...) Expand all
96 private: 95 private:
97 friend class BrowserChildProcessHostIterator; 96 friend class BrowserChildProcessHostIterator;
98 friend class BrowserChildProcessObserver; 97 friend class BrowserChildProcessObserver;
99 98
100 static BrowserChildProcessList* GetIterator(); 99 static BrowserChildProcessList* GetIterator();
101 100
102 static void AddObserver(BrowserChildProcessObserver* observer); 101 static void AddObserver(BrowserChildProcessObserver* observer);
103 static void RemoveObserver(BrowserChildProcessObserver* observer); 102 static void RemoveObserver(BrowserChildProcessObserver* observer);
104 103
105 // ChildProcessLauncher::Client implementation. 104 // ChildProcessLauncher::Client implementation.
106 virtual void OnProcessLaunched() override; 105 void OnProcessLaunched() override;
107 virtual void OnProcessLaunchFailed() override; 106 void OnProcessLaunchFailed() override;
108 107
109 #if defined(OS_WIN) 108 #if defined(OS_WIN)
110 // ObjectWatcher::Delegate implementation. 109 // ObjectWatcher::Delegate implementation.
111 void OnObjectSignaled(HANDLE object) override; 110 void OnObjectSignaled(HANDLE object) override;
112 #endif 111 #endif
113 112
114 ChildProcessData data_; 113 ChildProcessData data_;
115 BrowserChildProcessHostDelegate* delegate_; 114 BrowserChildProcessHostDelegate* delegate_;
116 scoped_ptr<ChildProcessHost> child_process_host_; 115 scoped_ptr<ChildProcessHost> child_process_host_;
117 116
118 scoped_ptr<ChildProcessLauncher> child_process_; 117 scoped_ptr<ChildProcessLauncher> child_process_;
119 118
120 PowerMonitorMessageBroadcaster power_monitor_message_broadcaster_; 119 PowerMonitorMessageBroadcaster power_monitor_message_broadcaster_;
121 120
122 #if defined(OS_WIN) 121 #if defined(OS_WIN)
123 // Watches to see if the child process exits before the IPC channel has 122 // Watches to see if the child process exits before the IPC channel has
124 // been connected. Thereafter, its exit is determined by an error on the 123 // been connected. Thereafter, its exit is determined by an error on the
125 // IPC channel. 124 // IPC channel.
126 base::win::ObjectWatcher early_exit_watcher_; 125 base::win::ObjectWatcher early_exit_watcher_;
127 #endif 126 #endif
128 }; 127 };
129 128
130 } // namespace content 129 } // namespace content
131 130
132 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ 131 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/bootstrap_sandbox_mac.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698