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

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

Issue 14081036: DevTools: Replace .allow-devtools-edit file check with confirmation infobar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 7 years, 8 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
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/string16.h"
14 #include "chrome/browser/devtools/devtools_file_helper.h" 15 #include "chrome/browser/devtools/devtools_file_helper.h"
15 #include "chrome/browser/devtools/devtools_toggle_action.h" 16 #include "chrome/browser/devtools/devtools_toggle_action.h"
16 #include "content/public/browser/devtools_client_host.h" 17 #include "content/public/browser/devtools_client_host.h"
17 #include "content/public/browser/devtools_frontend_host_delegate.h" 18 #include "content/public/browser/devtools_frontend_host_delegate.h"
18 #include "content/public/browser/notification_observer.h" 19 #include "content/public/browser/notification_observer.h"
19 #include "content/public/browser/notification_registrar.h" 20 #include "content/public/browser/notification_registrar.h"
20 #include "content/public/browser/web_contents_delegate.h" 21 #include "content/public/browser/web_contents_delegate.h"
21 22
22 class Browser; 23 class Browser;
23 class BrowserWindow; 24 class BrowserWindow;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 const std::string& content) OVERRIDE; 199 const std::string& content) OVERRIDE;
199 virtual void RequestFileSystems() OVERRIDE; 200 virtual void RequestFileSystems() OVERRIDE;
200 virtual void AddFileSystem() OVERRIDE; 201 virtual void AddFileSystem() OVERRIDE;
201 virtual void RemoveFileSystem(const std::string& file_system_path) OVERRIDE; 202 virtual void RemoveFileSystem(const std::string& file_system_path) OVERRIDE;
202 203
203 // DevToolsFileHelper callbacks. 204 // DevToolsFileHelper callbacks.
204 void FileSavedAs(const std::string& url); 205 void FileSavedAs(const std::string& url);
205 void AppendedTo(const std::string& url); 206 void AppendedTo(const std::string& url);
206 void FileSystemsLoaded( 207 void FileSystemsLoaded(
207 const std::vector<DevToolsFileHelper::FileSystem>& file_systems); 208 const std::vector<DevToolsFileHelper::FileSystem>& file_systems);
208 void FileSystemAdded(std::string error_string, 209 void ShowDevToolsConfirmInfoBar(
209 const DevToolsFileHelper::FileSystem& file_system); 210 const string16& message,
211 const base::Callback<void()>& accept_callback,
212 const base::Callback<void()>& cancel_callback);
213 void FileSystemAdded(const DevToolsFileHelper::FileSystem& file_system);
210 214
211 void UpdateBrowserToolbar(); 215 void UpdateBrowserToolbar();
212 bool IsDocked(); 216 bool IsDocked();
213 void Restore(); 217 void Restore();
214 static DevToolsDockSide GetDockSideFromPrefs(Profile* profile); 218 static DevToolsDockSide GetDockSideFromPrefs(Profile* profile);
215 static std::string SideToString(DevToolsDockSide dock_side); 219 static std::string SideToString(DevToolsDockSide dock_side);
216 static DevToolsDockSide SideFromString(const std::string& dock_side); 220 static DevToolsDockSide SideFromString(const std::string& dock_side);
217 221
218 content::WebContents* GetInspectedWebContents(); 222 content::WebContents* GetInspectedWebContents();
219 223
(...skipping 12 matching lines...) Expand all
232 scoped_ptr<content::DevToolsClientHost> frontend_host_; 236 scoped_ptr<content::DevToolsClientHost> frontend_host_;
233 base::WeakPtrFactory<DevToolsWindow> weak_factory_; 237 base::WeakPtrFactory<DevToolsWindow> weak_factory_;
234 scoped_ptr<DevToolsFileHelper> file_helper_; 238 scoped_ptr<DevToolsFileHelper> file_helper_;
235 int width_; 239 int width_;
236 int height_; 240 int height_;
237 DevToolsDockSide dock_side_before_minimized_; 241 DevToolsDockSide dock_side_before_minimized_;
238 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); 242 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow);
239 }; 243 };
240 244
241 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ 245 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698