| 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() | |
| 61 { | |
| 62 if (!m_proxy) | |
| 63 return true; | |
| 64 return m_proxy->allowFileSystem(); | |
| 65 } | |
| 66 | |
| 67 bool WorkerPermissionClient::requestFileSystemAccessSync() | 60 bool WorkerPermissionClient::requestFileSystemAccessSync() |
| 68 { | 61 { |
| 69 if (!m_proxy) | 62 if (!m_proxy) |
| 70 return true; | 63 return true; |
| 71 return m_proxy->requestFileSystemAccessSync(); | 64 return m_proxy->requestFileSystemAccessSync(); |
| 72 } | 65 } |
| 73 | 66 |
| 74 void WorkerPermissionClient::requestFileSystemAccessAsync(const WebPermissionCal
lbacks& callbacks) | |
| 75 { | |
| 76 if (!m_proxy) { | |
| 77 WebPermissionCallbacks permissionCallbacks(callbacks); | |
| 78 permissionCallbacks.doAllow(); | |
| 79 return; | |
| 80 } | |
| 81 m_proxy->requestFileSystemAccessAsync(callbacks); | |
| 82 } | |
| 83 | |
| 84 bool WorkerPermissionClient::allowIndexedDB(const WebString& name) | 67 bool WorkerPermissionClient::allowIndexedDB(const WebString& name) |
| 85 { | 68 { |
| 86 if (!m_proxy) | 69 if (!m_proxy) |
| 87 return true; | 70 return true; |
| 88 return m_proxy->allowIndexedDB(name); | 71 return m_proxy->allowIndexedDB(name); |
| 89 } | 72 } |
| 90 | 73 |
| 91 const char* WorkerPermissionClient::supplementName() | 74 const char* WorkerPermissionClient::supplementName() |
| 92 { | 75 { |
| 93 return "WorkerPermissionClient"; | 76 return "WorkerPermissionClient"; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 105 { | 88 { |
| 106 } | 89 } |
| 107 | 90 |
| 108 void providePermissionClientToWorker(WorkerClients* clients, PassOwnPtr<WebWorke
rPermissionClientProxy> proxy) | 91 void providePermissionClientToWorker(WorkerClients* clients, PassOwnPtr<WebWorke
rPermissionClientProxy> proxy) |
| 109 { | 92 { |
| 110 ASSERT(clients); | 93 ASSERT(clients); |
| 111 WorkerPermissionClient::provideTo(*clients, WorkerPermissionClient::suppleme
ntName(), WorkerPermissionClient::create(proxy)); | 94 WorkerPermissionClient::provideTo(*clients, WorkerPermissionClient::suppleme
ntName(), WorkerPermissionClient::create(proxy)); |
| 112 } | 95 } |
| 113 | 96 |
| 114 } // namespace blink | 97 } // namespace blink |
| OLD | NEW |