OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "config.h" | 5 #include "config.h" |
6 #include "modules/filesystem/InspectorFrontendHostFileSystem.h" | 6 #include "modules/filesystem/InspectorFrontendHostFileSystem.h" |
7 | 7 |
8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
9 #include "core/frame/Frame.h" | 9 #include "core/frame/Frame.h" |
10 #include "core/inspector/InspectorFrontendHost.h" | 10 #include "core/inspector/InspectorFrontendHost.h" |
11 #include "core/page/Page.h" | 11 #include "core/page/Page.h" |
12 #include "modules/filesystem/DOMFileSystem.h" | 12 #include "modules/filesystem/DOMFileSystem.h" |
13 #include "platform/JSONValues.h" | 13 #include "platform/JSONValues.h" |
14 | 14 |
15 namespace WebCore { | 15 namespace WebCore { |
16 | 16 |
17 PassRefPtr<DOMFileSystem> InspectorFrontendHostFileSystem::isolatedFileSystem(In
spectorFrontendHost* host, const String& fileSystemName, const String& rootURL) | 17 PassRefPtr<DOMFileSystem> InspectorFrontendHostFileSystem::isolatedFileSystem(In
spectorFrontendHost& host, const String& fileSystemName, const String& rootURL) |
18 { | 18 { |
19 ExecutionContext* context = host->frontendPage()->mainFrame()->document(); | 19 ExecutionContext* context = host.frontendPage()->mainFrame()->document(); |
20 return DOMFileSystem::create(context, fileSystemName, FileSystemTypeIsolated
, KURL(ParsedURLString, rootURL)); | 20 return DOMFileSystem::create(context, fileSystemName, FileSystemTypeIsolated
, KURL(ParsedURLString, rootURL)); |
21 } | 21 } |
22 | 22 |
23 void InspectorFrontendHostFileSystem::upgradeDraggedFileSystemPermissions(Inspec
torFrontendHost* host, DOMFileSystem* domFileSystem) | 23 void InspectorFrontendHostFileSystem::upgradeDraggedFileSystemPermissions(Inspec
torFrontendHost& host, DOMFileSystem* domFileSystem) |
24 { | 24 { |
25 RefPtr<JSONObject> message = JSONObject::create(); | 25 RefPtr<JSONObject> message = JSONObject::create(); |
26 message->setNumber("id", 0); | 26 message->setNumber("id", 0); |
27 message->setString("method", "upgradeDraggedFileSystemPermissions"); | 27 message->setString("method", "upgradeDraggedFileSystemPermissions"); |
28 RefPtr<JSONArray> params = JSONArray::create(); | 28 RefPtr<JSONArray> params = JSONArray::create(); |
29 message->setArray("params", params); | 29 message->setArray("params", params); |
30 params->pushString(domFileSystem->rootURL().string()); | 30 params->pushString(domFileSystem->rootURL().string()); |
31 host->sendMessageToEmbedder(message->toJSONString()); | 31 host.sendMessageToEmbedder(message->toJSONString()); |
32 } | 32 } |
33 | 33 |
34 InspectorFrontendHostFileSystem::InspectorFrontendHostFileSystem() { } | 34 InspectorFrontendHostFileSystem::InspectorFrontendHostFileSystem() { } |
35 | 35 |
36 InspectorFrontendHostFileSystem::~InspectorFrontendHostFileSystem() { } | 36 InspectorFrontendHostFileSystem::~InspectorFrontendHostFileSystem() { } |
37 | 37 |
38 | 38 |
39 } // namespace WebCore | 39 } // namespace WebCore |
OLD | NEW |