Save errno for logging before potentially overwriting it.
[chromium-blink-merge.git] / content / public / browser / devtools_frontend_host_delegate.h
blob22bdcc33403cf0df10a801a3cf51d4a2e552840b
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_DELEGATE_H_
8 #include <string>
10 namespace content {
12 // Clients that want to use default DevTools front-end implementation should
13 // implement this interface to provide access to the embedding browser from
14 // the front-end.
15 class DevToolsFrontendHostDelegate {
16 public:
17 virtual ~DevToolsFrontendHostDelegate() {}
19 // Should bring DevTools window to front.
20 virtual void ActivateWindow() = 0;
22 // Changes the height of attached DevTools window.
23 virtual void ChangeAttachedWindowHeight(unsigned height) = 0;
25 // Closes DevTools front-end window.
26 virtual void CloseWindow() = 0;
28 // Moves DevTools front-end window.
29 virtual void MoveWindow(int x, int y) = 0;
31 // Specifies side for devtools to dock to.
32 virtual void SetDockSide(const std::string& side) = 0;
34 // Opens given |url| in a new contents.
35 virtual void OpenInNewTab(const std::string& url) = 0;
37 // Saves given |content| associated with the given |url|. Optionally showing
38 // Save As dialog.
39 virtual void SaveToFile(const std::string& url,
40 const std::string& content,
41 bool save_as) = 0;
43 // Appends given |content| to the file that has been associated with the
44 // given |url| by SaveToFile method.
45 virtual void AppendToFile(const std::string& url,
46 const std::string& content) = 0;
48 // Requests the list of filesystems previously added for devtools.
49 virtual void RequestFileSystems() = 0;
51 // Shows a dialog to select a folder to which an isolated filesystem is added.
52 virtual void AddFileSystem() = 0;
54 // Removes a previously added devtools filesystem given by |file_system_path|.
55 virtual void RemoveFileSystem(const std::string& file_system_path) = 0;
57 // This method is called when the contents inspected by this devtools frontend
58 // is closing.
59 virtual void InspectedContentsClosing() = 0;
62 } // namespace content
64 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_FRONTEND_HOST_DELEGATE_H_