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

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_host.h

Issue 6201005: Initial support for partitioning cookies for isolated apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix automation_util and thread issue. Created 9 years, 9 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_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_
6 #define CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
11 #include <string> 11 #include <string>
12 12
13 #include "app/surface/transport_dib.h" 13 #include "app/surface/transport_dib.h"
14 #include "base/platform_file.h" 14 #include "base/platform_file.h"
15 #include "base/process.h" 15 #include "base/process.h"
16 #include "base/scoped_callback_factory.h" 16 #include "base/scoped_callback_factory.h"
17 #include "base/scoped_ptr.h" 17 #include "base/scoped_ptr.h"
18 #include "base/timer.h" 18 #include "base/timer.h"
19 #include "chrome/common/notification_observer.h" 19 #include "chrome/common/notification_observer.h"
20 #include "chrome/common/notification_registrar.h" 20 #include "chrome/common/notification_registrar.h"
21 #include "content/browser/child_process_launcher.h" 21 #include "content/browser/child_process_launcher.h"
22 #include "content/browser/renderer_host/render_process_host.h" 22 #include "content/browser/renderer_host/render_process_host.h"
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
24 24
25 class CommandLine; 25 class CommandLine;
26 class Extension;
26 class RendererMainThread; 27 class RendererMainThread;
27 class RenderWidgetHelper; 28 class RenderWidgetHelper;
28 class VisitedLinkUpdater; 29 class VisitedLinkUpdater;
29 30
30 namespace base { 31 namespace base {
31 class SharedMemory; 32 class SharedMemory;
32 } 33 }
33 34
34 // Implements a concrete RenderProcessHost for the browser process for talking 35 // Implements a concrete RenderProcessHost for the browser process for talking
35 // to actual renderer processes (as opposed to mocks). 36 // to actual renderer processes (as opposed to mocks).
(...skipping 10 matching lines...) Expand all
46 // are correlated with IDs. This way, the Views and the corresponding ViewHosts 47 // are correlated with IDs. This way, the Views and the corresponding ViewHosts
47 // communicate through the two process objects. 48 // communicate through the two process objects.
48 class BrowserRenderProcessHost : public RenderProcessHost, 49 class BrowserRenderProcessHost : public RenderProcessHost,
49 public NotificationObserver, 50 public NotificationObserver,
50 public ChildProcessLauncher::Client { 51 public ChildProcessLauncher::Client {
51 public: 52 public:
52 explicit BrowserRenderProcessHost(Profile* profile); 53 explicit BrowserRenderProcessHost(Profile* profile);
53 ~BrowserRenderProcessHost(); 54 ~BrowserRenderProcessHost();
54 55
55 // RenderProcessHost implementation (public portion). 56 // RenderProcessHost implementation (public portion).
56 virtual bool Init(bool is_accessibility_enabled, bool is_extensions_process); 57 virtual bool Init(bool is_accessibility_enabled,
58 bool is_extensions_process,
59 const Extension* installed_app);
57 virtual int GetNextRoutingID(); 60 virtual int GetNextRoutingID();
58 virtual void CancelResourceRequests(int render_widget_id); 61 virtual void CancelResourceRequests(int render_widget_id);
59 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); 62 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params);
60 virtual bool WaitForUpdateMsg(int render_widget_id, 63 virtual bool WaitForUpdateMsg(int render_widget_id,
61 const base::TimeDelta& max_delay, 64 const base::TimeDelta& max_delay,
62 IPC::Message* msg); 65 IPC::Message* msg);
63 virtual void ReceivedBadMessage(); 66 virtual void ReceivedBadMessage();
64 virtual void WidgetRestored(); 67 virtual void WidgetRestored();
65 virtual void WidgetHidden(); 68 virtual void WidgetHidden();
66 virtual void ViewCreated(); 69 virtual void ViewCreated();
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // Buffer visited links and send them to to renderer. 195 // Buffer visited links and send them to to renderer.
193 scoped_ptr<VisitedLinkUpdater> visited_link_updater_; 196 scoped_ptr<VisitedLinkUpdater> visited_link_updater_;
194 197
195 // True if this prcoess should have accessibility enabled; 198 // True if this prcoess should have accessibility enabled;
196 bool accessibility_enabled_; 199 bool accessibility_enabled_;
197 200
198 // True iff this process is being used as an extension process. Not valid 201 // True iff this process is being used as an extension process. Not valid
199 // when running in single-process mode. 202 // when running in single-process mode.
200 bool extension_process_; 203 bool extension_process_;
201 204
202 // Usedt to launch and terminate the process without blocking the UI thread. 205 // The Extension for the hosted or packaged app if any, NULL otherwise.
206 scoped_refptr<const Extension> installed_app_;
207
208 // Used to launch and terminate the process without blocking the UI thread.
203 scoped_ptr<ChildProcessLauncher> child_process_; 209 scoped_ptr<ChildProcessLauncher> child_process_;
204 210
205 // Messages we queue while waiting for the process handle. We queue them here 211 // Messages we queue while waiting for the process handle. We queue them here
206 // instead of in the channel so that we ensure they're sent after init related 212 // instead of in the channel so that we ensure they're sent after init related
207 // messages that are sent once the process handle is available. This is 213 // messages that are sent once the process handle is available. This is
208 // because the queued messages may have dependencies on the init messages. 214 // because the queued messages may have dependencies on the init messages.
209 std::queue<IPC::Message*> queued_messages_; 215 std::queue<IPC::Message*> queued_messages_;
210 216
211 base::ScopedCallbackFactory<BrowserRenderProcessHost> callback_factory_; 217 base::ScopedCallbackFactory<BrowserRenderProcessHost> callback_factory_;
212 218
213 DISALLOW_COPY_AND_ASSIGN(BrowserRenderProcessHost); 219 DISALLOW_COPY_AND_ASSIGN(BrowserRenderProcessHost);
214 }; 220 };
215 221
216 #endif // CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ 222 #endif // CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698