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

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: Refactor and address comments. 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/browser/child_process_launcher.h" 19 #include "chrome/browser/child_process_launcher.h"
20 #include "chrome/browser/renderer_host/render_process_host.h" 20 #include "chrome/browser/renderer_host/render_process_host.h"
21 #include "chrome/common/notification_observer.h" 21 #include "chrome/common/notification_observer.h"
22 #include "chrome/common/notification_registrar.h" 22 #include "chrome/common/notification_registrar.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, bool is_extensions_process,
58 const Extension* installed_app);
57 virtual int GetNextRoutingID(); 59 virtual int GetNextRoutingID();
58 virtual void CancelResourceRequests(int render_widget_id); 60 virtual void CancelResourceRequests(int render_widget_id);
59 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params); 61 virtual void CrossSiteClosePageACK(const ViewMsg_ClosePage_Params& params);
60 virtual bool WaitForUpdateMsg(int render_widget_id, 62 virtual bool WaitForUpdateMsg(int render_widget_id,
61 const base::TimeDelta& max_delay, 63 const base::TimeDelta& max_delay,
62 IPC::Message* msg); 64 IPC::Message* msg);
63 virtual void ReceivedBadMessage(); 65 virtual void ReceivedBadMessage();
64 virtual void WidgetRestored(); 66 virtual void WidgetRestored();
65 virtual void WidgetHidden(); 67 virtual void WidgetHidden();
66 virtual void ViewCreated(); 68 virtual void ViewCreated();
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // Buffer visited links and send them to to renderer. 198 // Buffer visited links and send them to to renderer.
197 scoped_ptr<VisitedLinkUpdater> visited_link_updater_; 199 scoped_ptr<VisitedLinkUpdater> visited_link_updater_;
198 200
199 // True if this prcoess should have accessibility enabled; 201 // True if this prcoess should have accessibility enabled;
200 bool accessibility_enabled_; 202 bool accessibility_enabled_;
201 203
202 // True iff this process is being used as an extension process. Not valid 204 // True iff this process is being used as an extension process. Not valid
203 // when running in single-process mode. 205 // when running in single-process mode.
204 bool extension_process_; 206 bool extension_process_;
205 207
206 // Usedt to launch and terminate the process without blocking the UI thread. 208 // The Extension for the hosted or packaged app if any, NULL otherwise.
209 scoped_refptr<const Extension> installed_app_;
210
211 // Used to launch and terminate the process without blocking the UI thread.
207 scoped_ptr<ChildProcessLauncher> child_process_; 212 scoped_ptr<ChildProcessLauncher> child_process_;
208 213
209 // Messages we queue while waiting for the process handle. We queue them here 214 // Messages we queue while waiting for the process handle. We queue them here
210 // instead of in the channel so that we ensure they're sent after init related 215 // instead of in the channel so that we ensure they're sent after init related
211 // messages that are sent once the process handle is available. This is 216 // messages that are sent once the process handle is available. This is
212 // because the queued messages may have dependencies on the init messages. 217 // because the queued messages may have dependencies on the init messages.
213 std::queue<IPC::Message*> queued_messages_; 218 std::queue<IPC::Message*> queued_messages_;
214 219
215 base::ScopedCallbackFactory<BrowserRenderProcessHost> callback_factory_; 220 base::ScopedCallbackFactory<BrowserRenderProcessHost> callback_factory_;
216 221
217 DISALLOW_COPY_AND_ASSIGN(BrowserRenderProcessHost); 222 DISALLOW_COPY_AND_ASSIGN(BrowserRenderProcessHost);
218 }; 223 };
219 224
220 #endif // CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_ 225 #endif // CHROME_BROWSER_RENDERER_HOST_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698