OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 { | 50 { |
51 } | 51 } |
52 | 52 |
53 bool WorkerPermissionClient::allowDatabase(const WebString& name, const WebStrin
g& displayName, unsigned long estimatedSize) | 53 bool WorkerPermissionClient::allowDatabase(const WebString& name, const WebStrin
g& displayName, unsigned long estimatedSize) |
54 { | 54 { |
55 if (!m_proxy) | 55 if (!m_proxy) |
56 return true; | 56 return true; |
57 return m_proxy->allowDatabase(name, displayName, estimatedSize); | 57 return m_proxy->allowDatabase(name, displayName, estimatedSize); |
58 } | 58 } |
59 | 59 |
60 bool WorkerPermissionClient::allowFileSystem() | 60 bool WorkerPermissionClient::requestFileSystemAccessSync() |
61 { | 61 { |
62 if (!m_proxy) | 62 if (!m_proxy) |
63 return true; | 63 return true; |
64 return m_proxy->allowFileSystem(); | 64 return m_proxy->requestFileSystemAccessSync(); |
65 } | |
66 | |
67 void WorkerPermissionClient::requestFileSystemAccess(const WebPermissionCallback
s& callbacks) | |
68 { | |
69 if (!m_proxy) { | |
70 WebPermissionCallbacks permissionCallbacks(callbacks); | |
71 permissionCallbacks.doAllow(); | |
72 return; | |
73 } | |
74 m_proxy->requestFileSystemAccess(callbacks); | |
75 } | 65 } |
76 | 66 |
77 bool WorkerPermissionClient::allowIndexedDB(const WebString& name) | 67 bool WorkerPermissionClient::allowIndexedDB(const WebString& name) |
78 { | 68 { |
79 if (!m_proxy) | 69 if (!m_proxy) |
80 return true; | 70 return true; |
81 return m_proxy->allowIndexedDB(name); | 71 return m_proxy->allowIndexedDB(name); |
82 } | 72 } |
83 | 73 |
84 const char* WorkerPermissionClient::supplementName() | 74 const char* WorkerPermissionClient::supplementName() |
(...skipping 13 matching lines...) Expand all Loading... |
98 { | 88 { |
99 } | 89 } |
100 | 90 |
101 void providePermissionClientToWorker(WorkerClients* clients, PassOwnPtr<WebWorke
rPermissionClientProxy> proxy) | 91 void providePermissionClientToWorker(WorkerClients* clients, PassOwnPtr<WebWorke
rPermissionClientProxy> proxy) |
102 { | 92 { |
103 ASSERT(clients); | 93 ASSERT(clients); |
104 WorkerPermissionClient::provideTo(*clients, WorkerPermissionClient::suppleme
ntName(), WorkerPermissionClient::create(proxy)); | 94 WorkerPermissionClient::provideTo(*clients, WorkerPermissionClient::suppleme
ntName(), WorkerPermissionClient::create(proxy)); |
105 } | 95 } |
106 | 96 |
107 } // namespace blink | 97 } // namespace blink |
OLD | NEW |