| 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 23 matching lines...) Expand all Loading... |
| 34 #include "WebFrameImpl.h" | 34 #include "WebFrameImpl.h" |
| 35 #include "WebViewImpl.h" | 35 #include "WebViewImpl.h" |
| 36 #include "core/dom/Document.h" | 36 #include "core/dom/Document.h" |
| 37 #include "platform/AsyncFileSystemCallbacks.h" | 37 #include "platform/AsyncFileSystemCallbacks.h" |
| 38 #include "public/platform/Platform.h" | 38 #include "public/platform/Platform.h" |
| 39 #include "public/platform/WebFileError.h" | 39 #include "public/platform/WebFileError.h" |
| 40 #include "public/platform/WebFileSystem.h" | 40 #include "public/platform/WebFileSystem.h" |
| 41 #include "public/platform/WebFileSystemCallbacks.h" | 41 #include "public/platform/WebFileSystemCallbacks.h" |
| 42 #include "public/platform/WebFileSystemType.h" | 42 #include "public/platform/WebFileSystemType.h" |
| 43 #include "public/web/WebPermissionClient.h" | 43 #include "public/web/WebPermissionClient.h" |
| 44 #include "weborigin/SecurityOrigin.h" | 44 #include "platform/weborigin/SecurityOrigin.h" |
| 45 #include "wtf/text/WTFString.h" | 45 #include "wtf/text/WTFString.h" |
| 46 | 46 |
| 47 using namespace WebCore; | 47 using namespace WebCore; |
| 48 | 48 |
| 49 namespace WebKit { | 49 namespace WebKit { |
| 50 | 50 |
| 51 PassOwnPtr<FileSystemClient> LocalFileSystemClient::create() | 51 PassOwnPtr<FileSystemClient> LocalFileSystemClient::create() |
| 52 { | 52 { |
| 53 return adoptPtr(static_cast<FileSystemClient*>(new LocalFileSystemClient()))
; | 53 return adoptPtr(static_cast<FileSystemClient*>(new LocalFileSystemClient()))
; |
| 54 } | 54 } |
| 55 | 55 |
| 56 LocalFileSystemClient::~LocalFileSystemClient() | 56 LocalFileSystemClient::~LocalFileSystemClient() |
| 57 { | 57 { |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool LocalFileSystemClient::allowFileSystem(ExecutionContext* context) | 60 bool LocalFileSystemClient::allowFileSystem(ExecutionContext* context) |
| 61 { | 61 { |
| 62 Document* document = toDocument(context); | 62 Document* document = toDocument(context); |
| 63 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); | 63 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); |
| 64 WebKit::WebViewImpl* webView = webFrame->viewImpl(); | 64 WebKit::WebViewImpl* webView = webFrame->viewImpl(); |
| 65 | 65 |
| 66 return !webView->permissionClient() || webView->permissionClient()->allowFil
eSystem(webFrame); | 66 return !webView->permissionClient() || webView->permissionClient()->allowFil
eSystem(webFrame); |
| 67 } | 67 } |
| 68 | 68 |
| 69 LocalFileSystemClient::LocalFileSystemClient() | 69 LocalFileSystemClient::LocalFileSystemClient() |
| 70 { | 70 { |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace WebKit | 73 } // namespace WebKit |
| OLD | NEW |