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

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

Issue 900543003: DevTools: do not abuse inspector controller for the front-end side plumbing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed initializer. Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/web/FrameLoaderClientImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "modules/filesystem/DevToolsHostFileSystem.h" 6 #include "modules/filesystem/DevToolsHostFileSystem.h"
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/inspector/DevToolsHost.h" 10 #include "core/inspector/DevToolsHost.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 blink { 15 namespace blink {
16 16
17 DOMFileSystem* DevToolsHostFileSystem::isolatedFileSystem(DevToolsHost& host, co nst String& fileSystemName, const String& rootURL) 17 DOMFileSystem* DevToolsHostFileSystem::isolatedFileSystem(DevToolsHost& host, co nst String& fileSystemName, const String& rootURL)
18 { 18 {
19 ExecutionContext* context = host.frontendPage()->deprecatedLocalMainFrame()- >document(); 19 ExecutionContext* context = host.frontendFrame()->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 DevToolsHostFileSystem::upgradeDraggedFileSystemPermissions(DevToolsHost& h ost, DOMFileSystem* domFileSystem) 23 void DevToolsHostFileSystem::upgradeDraggedFileSystemPermissions(DevToolsHost& h ost, 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 DevToolsHostFileSystem::DevToolsHostFileSystem() { } 34 DevToolsHostFileSystem::DevToolsHostFileSystem() { }
35 35
36 DevToolsHostFileSystem::~DevToolsHostFileSystem() { } 36 DevToolsHostFileSystem::~DevToolsHostFileSystem() { }
37 37
38 38
39 } // namespace blink 39 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/web/FrameLoaderClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698