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

Side by Side Diff: chrome/browser/devtools/devtools_window.h

Issue 11570081: Support file system access in DevTools with isolated file system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added fs name / root url generation in browser process as recommended by kinuko@ and addressed tsep… Created 7 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 const content::NotificationDetails& details) OVERRIDE; 135 const content::NotificationDetails& details) OVERRIDE;
136 136
137 void ScheduleAction(DevToolsToggleAction action); 137 void ScheduleAction(DevToolsToggleAction action);
138 void DoAction(); 138 void DoAction();
139 static GURL GetDevToolsUrl(Profile* profile, 139 static GURL GetDevToolsUrl(Profile* profile,
140 DevToolsDockSide dock_side, 140 DevToolsDockSide dock_side,
141 bool shared_worker_frontend); 141 bool shared_worker_frontend);
142 void UpdateTheme(); 142 void UpdateTheme();
143 void AddDevToolsExtensionsToClient(); 143 void AddDevToolsExtensionsToClient();
144 void CallClientFunction(const std::string& function_name, 144 void CallClientFunction(const std::string& function_name,
145 const base::Value* arg); 145 const base::Value* arg1 = NULL,
146 const base::Value* arg2 = NULL);
146 // Overridden from content::WebContentsDelegate. 147 // Overridden from content::WebContentsDelegate.
147 virtual content::WebContents* OpenURLFromTab( 148 virtual content::WebContents* OpenURLFromTab(
148 content::WebContents* source, 149 content::WebContents* source,
149 const content::OpenURLParams& params) OVERRIDE; 150 const content::OpenURLParams& params) OVERRIDE;
150 virtual void AddNewContents(content::WebContents* source, 151 virtual void AddNewContents(content::WebContents* source,
151 content::WebContents* new_contents, 152 content::WebContents* new_contents,
152 WindowOpenDisposition disposition, 153 WindowOpenDisposition disposition,
153 const gfx::Rect& initial_pos, 154 const gfx::Rect& initial_pos,
154 bool user_gesture, 155 bool user_gesture,
155 bool* was_blocked) OVERRIDE; 156 bool* was_blocked) OVERRIDE;
(...skipping 19 matching lines...) Expand all
175 virtual void ActivateWindow() OVERRIDE; 176 virtual void ActivateWindow() OVERRIDE;
176 virtual void CloseWindow() OVERRIDE; 177 virtual void CloseWindow() OVERRIDE;
177 virtual void MoveWindow(int x, int y) OVERRIDE; 178 virtual void MoveWindow(int x, int y) OVERRIDE;
178 virtual void SetDockSide(const std::string& side) OVERRIDE; 179 virtual void SetDockSide(const std::string& side) OVERRIDE;
179 virtual void OpenInNewTab(const std::string& url) OVERRIDE; 180 virtual void OpenInNewTab(const std::string& url) OVERRIDE;
180 virtual void SaveToFile(const std::string& url, 181 virtual void SaveToFile(const std::string& url,
181 const std::string& content, 182 const std::string& content,
182 bool save_as) OVERRIDE; 183 bool save_as) OVERRIDE;
183 virtual void AppendToFile(const std::string& url, 184 virtual void AppendToFile(const std::string& url,
184 const std::string& content) OVERRIDE; 185 const std::string& content) OVERRIDE;
186 virtual void RequestFileSystems() OVERRIDE;
187 virtual void AddFileSystem() OVERRIDE;
188 virtual void RemoveFileSystem(const std::string& file_system_path) OVERRIDE;
185 189
186 // DevToolsFileHelper callbacks. 190 // DevToolsFileHelper callbacks.
187 void FileSavedAs(const std::string& url); 191 void FileSavedAs(const std::string& url);
188 void AppendedTo(const std::string& url); 192 void AppendedTo(const std::string& url);
193 void FileSystemsLoaded(
194 const std::vector<DevToolsFileHelper::FileSystem>& file_systems);
195 void FileSystemAdded(std::string error_string,
196 const DevToolsFileHelper::FileSystem& file_system);
189 197
190 void UpdateBrowserToolbar(); 198 void UpdateBrowserToolbar();
191 bool IsDocked(); 199 bool IsDocked();
192 static DevToolsDockSide GetDockSideFromPrefs(Profile* profile); 200 static DevToolsDockSide GetDockSideFromPrefs(Profile* profile);
193 static std::string SideToString(DevToolsDockSide dock_side); 201 static std::string SideToString(DevToolsDockSide dock_side);
194 static DevToolsDockSide SideFromString(const std::string& dock_side); 202 static DevToolsDockSide SideFromString(const std::string& dock_side);
195 203
196 Profile* profile_; 204 Profile* profile_;
197 content::WebContents* inspected_web_contents_; 205 content::WebContents* inspected_web_contents_;
198 content::WebContents* web_contents_; 206 content::WebContents* web_contents_;
199 Browser* browser_; 207 Browser* browser_;
200 DevToolsDockSide dock_side_; 208 DevToolsDockSide dock_side_;
201 bool is_loaded_; 209 bool is_loaded_;
202 DevToolsToggleAction action_on_load_; 210 DevToolsToggleAction action_on_load_;
203 content::NotificationRegistrar registrar_; 211 content::NotificationRegistrar registrar_;
204 content::DevToolsClientHost* frontend_host_; 212 content::DevToolsClientHost* frontend_host_;
205 base::WeakPtrFactory<DevToolsWindow> weak_factory_; 213 base::WeakPtrFactory<DevToolsWindow> weak_factory_;
206 scoped_ptr<DevToolsFileHelper> file_helper_; 214 scoped_ptr<DevToolsFileHelper> file_helper_;
207 int width_; 215 int width_;
208 int height_; 216 int height_;
209 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); 217 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow);
210 }; 218 };
211 219
212 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ 220 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_file_helper.cc ('k') | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698