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

Side by Side Diff: content/worker/websharedworker_stub.h

Issue 9154003: Pass Content-security-policy and header type from WebSharedWorkerProxy to WebSharedWorkerStub. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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
« no previous file with comments | « content/renderer/websharedworker_proxy.cc ('k') | content/worker/websharedworker_stub.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) 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 CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_ 5 #ifndef CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_
6 #define CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_ 6 #define CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/worker/websharedworkerclient_proxy.h" 10 #include "content/worker/websharedworkerclient_proxy.h"
11 #include "content/worker/worker_webapplicationcachehost_impl.h" 11 #include "content/worker/worker_webapplicationcachehost_impl.h"
12 #include "googleurl/src/gurl.h" 12 #include "googleurl/src/gurl.h"
13 #include "ipc/ipc_channel.h" 13 #include "ipc/ipc_channel.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorker.h"
14 15
15 namespace WebKit { 16 namespace WebKit {
16 class WebSharedWorker; 17 class WebSharedWorker;
17 } 18 }
18 19
19 class SharedWorkerDevToolsAgent; 20 class SharedWorkerDevToolsAgent;
20 21
21 // This class creates a WebSharedWorker, and translates incoming IPCs to the 22 // This class creates a WebSharedWorker, and translates incoming IPCs to the
22 // appropriate WebSharedWorker APIs. 23 // appropriate WebSharedWorker APIs.
23 class WebSharedWorkerStub : public IPC::Channel::Listener { 24 class WebSharedWorkerStub : public IPC::Channel::Listener {
(...skipping 20 matching lines...) Expand all
44 45
45 // Returns the script url of this worker. 46 // Returns the script url of this worker.
46 const GURL& url(); 47 const GURL& url();
47 48
48 49
49 private: 50 private:
50 virtual ~WebSharedWorkerStub(); 51 virtual ~WebSharedWorkerStub();
51 52
52 void OnConnect(int sent_message_port_id, int routing_id); 53 void OnConnect(int sent_message_port_id, int routing_id);
53 void OnStartWorkerContext( 54 void OnStartWorkerContext(
54 const GURL& url, const string16& user_agent, const string16& source_code); 55 const GURL& url, const string16& user_agent, const string16& source_code,
56 const string16& content_security_policy,
57 WebKit::WebContentSecurityPolicyType policy_type);
58
55 void OnTerminateWorkerContext(); 59 void OnTerminateWorkerContext();
56 60
57 int route_id_; 61 int route_id_;
58 WorkerAppCacheInitInfo appcache_init_info_; 62 WorkerAppCacheInitInfo appcache_init_info_;
59 63
60 // WebSharedWorkerClient that responds to outgoing API calls 64 // WebSharedWorkerClient that responds to outgoing API calls
61 // from the worker object. 65 // from the worker object.
62 WebSharedWorkerClientProxy client_; 66 WebSharedWorkerClientProxy client_;
63 67
64 WebKit::WebSharedWorker* impl_; 68 WebKit::WebSharedWorker* impl_;
65 string16 name_; 69 string16 name_;
66 bool started_; 70 bool started_;
67 GURL url_; 71 GURL url_;
68 scoped_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_; 72 scoped_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_;
69 73
70 typedef std::pair<int, int> PendingConnectInfo; 74 typedef std::pair<int, int> PendingConnectInfo;
71 typedef std::vector<PendingConnectInfo> PendingConnectInfoList; 75 typedef std::vector<PendingConnectInfo> PendingConnectInfoList;
72 PendingConnectInfoList pending_connects_; 76 PendingConnectInfoList pending_connects_;
73 77
74 DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerStub); 78 DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerStub);
75 }; 79 };
76 80
77 #endif // CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_ 81 #endif // CONTENT_WORKER_WEBSHAREDWORKER_STUB_H_
OLDNEW
« no previous file with comments | « content/renderer/websharedworker_proxy.cc ('k') | content/worker/websharedworker_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698