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

Side by Side Diff: third_party/WebKit/Source/modules/filesystem/DevToolsHostFileSystem.cpp

Issue 2293493003: Move blink platform's JSON code into a directory. (Closed)
Patch Set: Created 4 years, 3 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
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 "modules/filesystem/DevToolsHostFileSystem.h" 5 #include "modules/filesystem/DevToolsHostFileSystem.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/inspector/DevToolsHost.h" 9 #include "core/inspector/DevToolsHost.h"
10 #include "core/page/Page.h" 10 #include "core/page/Page.h"
11 #include "modules/filesystem/DOMFileSystem.h" 11 #include "modules/filesystem/DOMFileSystem.h"
12 #include "platform/JSONValues.h" 12 #include "platform/json/JSONValues.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 DOMFileSystem* DevToolsHostFileSystem::isolatedFileSystem(DevToolsHost& host, co nst String& fileSystemName, const String& rootURL) 16 DOMFileSystem* DevToolsHostFileSystem::isolatedFileSystem(DevToolsHost& host, co nst String& fileSystemName, const String& rootURL)
17 { 17 {
18 ExecutionContext* context = host.frontendFrame()->document(); 18 ExecutionContext* context = host.frontendFrame()->document();
19 return DOMFileSystem::create(context, fileSystemName, FileSystemTypeIsolated , KURL(ParsedURLString, rootURL)); 19 return DOMFileSystem::create(context, fileSystemName, FileSystemTypeIsolated , KURL(ParsedURLString, rootURL));
20 } 20 }
21 21
22 void DevToolsHostFileSystem::upgradeDraggedFileSystemPermissions(DevToolsHost& h ost, DOMFileSystem* domFileSystem) 22 void DevToolsHostFileSystem::upgradeDraggedFileSystemPermissions(DevToolsHost& h ost, DOMFileSystem* domFileSystem)
23 { 23 {
24 std::unique_ptr<JSONObject> message = JSONObject::create(); 24 std::unique_ptr<JSONObject> message = JSONObject::create();
25 message->setInteger("id", 0); 25 message->setInteger("id", 0);
26 message->setString("method", "upgradeDraggedFileSystemPermissions"); 26 message->setString("method", "upgradeDraggedFileSystemPermissions");
27 std::unique_ptr<JSONArray> params = JSONArray::create(); 27 std::unique_ptr<JSONArray> params = JSONArray::create();
28 params->pushString(domFileSystem->rootURL().getString()); 28 params->pushString(domFileSystem->rootURL().getString());
29 message->setArray("params", std::move(params)); 29 message->setArray("params", std::move(params));
30 host.sendMessageToEmbedder(message->toJSONString()); 30 host.sendMessageToEmbedder(message->toJSONString());
31 } 31 }
32 32
33 } // namespace blink 33 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp ('k') | third_party/WebKit/Source/platform/JSONParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698