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

Side by Side Diff: content/worker/shared_worker_permission_client_proxy.cc

Issue 411283002: Remove disable-embedded-shared-worker flag and shared worker process related codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/worker/shared_worker_permission_client_proxy.h"
6
7 #include "content/child/thread_safe_sender.h"
8 #include "content/common/worker_messages.h"
9 #include "third_party/WebKit/public/platform/WebString.h"
10 #include "url/gurl.h"
11
12 namespace content {
13
14 SharedWorkerPermissionClientProxy::SharedWorkerPermissionClientProxy(
15 const GURL& origin_url,
16 bool is_unique_origin,
17 int routing_id,
18 ThreadSafeSender* thread_safe_sender)
19 : origin_url_(origin_url),
20 is_unique_origin_(is_unique_origin),
21 routing_id_(routing_id),
22 thread_safe_sender_(thread_safe_sender) {
23 }
24
25 SharedWorkerPermissionClientProxy::~SharedWorkerPermissionClientProxy() {
26 }
27
28 bool SharedWorkerPermissionClientProxy::allowDatabase(
29 const blink::WebString& name,
30 const blink::WebString& display_name,
31 unsigned long estimated_size) {
32 if (is_unique_origin_)
33 return false;
34 bool result = false;
35 thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowDatabase(
36 routing_id_, origin_url_, name, display_name,
37 estimated_size, &result));
38 return result;
39 }
40
41 bool SharedWorkerPermissionClientProxy::requestFileSystemAccessSync() {
42 if (is_unique_origin_)
43 return false;
44 bool result = false;
45 thread_safe_sender_->Send(
46 new WorkerProcessHostMsg_RequestFileSystemAccessSync(
47 routing_id_, origin_url_, &result));
48 return result;
49 }
50
51 bool SharedWorkerPermissionClientProxy::allowIndexedDB(
52 const blink::WebString& name) {
53 if (is_unique_origin_)
54 return false;
55 bool result = false;
56 thread_safe_sender_->Send(new WorkerProcessHostMsg_AllowIndexedDB(
57 routing_id_, origin_url_, name, &result));
58 return result;
59 }
60
61 } // namespace content
OLDNEW
« no previous file with comments | « content/worker/shared_worker_permission_client_proxy.h ('k') | content/worker/websharedworker_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698