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

Side by Side Diff: chrome/common/child_process_host.h

Issue 2906007: Moved sending the PluginProcessMsg_AskForShutdown message to the CreateChanne... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 5 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_COMMON_CHILD_PROCESS_HOST_H_ 5 #ifndef CHROME_COMMON_CHILD_PROCESS_HOST_H_
6 #define CHROME_COMMON_CHILD_PROCESS_HOST_H_ 6 #define CHROME_COMMON_CHILD_PROCESS_HOST_H_
7 7
8 #if defined(OS_WIN)
9 #include <windows.h>
10 #endif // defined(OS_WIN)
11
8 #include <list> 12 #include <list>
9 #include <string> 13 #include <string>
10 14
11 // Must be included early (e.g. before chrome/common/plugin_messages.h) 15 // Must be included early (e.g. before chrome/common/plugin_messages.h)
12 #include "ipc/ipc_logging.h" 16 #include "ipc/ipc_logging.h"
13 17
14 #include "base/basictypes.h" 18 #include "base/basictypes.h"
15 #include "base/file_path.h" 19 #include "base/file_path.h"
16 #include "base/scoped_ptr.h" 20 #include "base/scoped_ptr.h"
17 #include "chrome/common/notification_type.h" 21 #include "chrome/common/notification_type.h"
(...skipping 18 matching lines...) Expand all
36 // fork from /proc/self/exe rather than using the "real" app path. This 40 // fork from /proc/self/exe rather than using the "real" app path. This
37 // prevents autoupdate from confusing us if it changes the file out from 41 // prevents autoupdate from confusing us if it changes the file out from
38 // under us. You will generally want to set this to true, except when there 42 // under us. You will generally want to set this to true, except when there
39 // is an override to the command line (for example, we're forking a renderer 43 // is an override to the command line (for example, we're forking a renderer
40 // in gdb). In this case, you'd use GetChildPath to get the real executable 44 // in gdb). In this case, you'd use GetChildPath to get the real executable
41 // file name, and then prepend the GDB command to the command line. 45 // file name, and then prepend the GDB command to the command line.
42 // 46 //
43 // On failure, returns an empty FilePath. 47 // On failure, returns an empty FilePath.
44 static FilePath GetChildPath(bool allow_self); 48 static FilePath GetChildPath(bool allow_self);
45 49
50 #if defined(OS_WIN)
51 // See comments in the cc file. This is a common hack needed for a process
52 // hosting a sandboxed child process. Hence it lives in this file.
53 static void PreCacheFont(LOGFONT font);
54 #endif // defined(OS_WIN)
55
46 protected: 56 protected:
47 ChildProcessHost(); 57 ChildProcessHost();
48 58
49 // A helper method to send an IPC message to the child on the channel. 59 // A helper method to send an IPC message to the child on the channel.
50 // It behavies just like IPC::Message::Sender::Send. The implementor takes 60 // It behavies just like IPC::Message::Sender::Send. The implementor takes
51 // ownership of the given Message regardless of whether or not this method 61 // ownership of the given Message regardless of whether or not this method
52 // succeeds. This class does not implement IPC::Message::Sender to prevent 62 // succeeds. This class does not implement IPC::Message::Sender to prevent
53 // conflicts with subclasses which indirectly could inherit from 63 // conflicts with subclasses which indirectly could inherit from
54 // IPC::Message::Sender. 64 // IPC::Message::Sender.
55 bool SendOnChannel(IPC::Message* msg); 65 bool SendOnChannel(IPC::Message* msg);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 112
103 ListenerHook listener_; 113 ListenerHook listener_;
104 114
105 bool opening_channel_; // True while we're waiting the channel to be opened. 115 bool opening_channel_; // True while we're waiting the channel to be opened.
106 scoped_ptr<IPC::Channel> channel_; 116 scoped_ptr<IPC::Channel> channel_;
107 std::string channel_id_; 117 std::string channel_id_;
108 }; 118 };
109 119
110 #endif // CHROME_COMMON_CHILD_PROCESS_HOST_H_ 120 #endif // CHROME_COMMON_CHILD_PROCESS_HOST_H_
111 121
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.cc ('k') | chrome/common/child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698