OLD | NEW |
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 COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_ | 5 #ifndef COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_ |
6 #define COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_ | 6 #define COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "url/gurl.h" |
11 | 11 |
12 namespace devtools_http_handler { | 12 namespace devtools_http_handler { |
13 | 13 |
14 class DevToolsHttpHandlerDelegate { | 14 class DevToolsHttpHandlerDelegate { |
15 public: | 15 public: |
16 virtual ~DevToolsHttpHandlerDelegate() {} | 16 virtual ~DevToolsHttpHandlerDelegate() {} |
17 | 17 |
18 // Should return discovery page HTML that should list available tabs | 18 // Should return discovery page HTML that should list available tabs |
19 // and provide attach links. | 19 // and provide attach links. |
20 virtual std::string GetDiscoveryPageHTML() = 0; | 20 virtual std::string GetDiscoveryPageHTML() = 0; |
21 | 21 |
22 // Returns frontend resource data by |path|. Only used if | 22 // Returns frontend resource data by |path|. Only used if |
23 // |BundlesFrontendResources| returns |true|. | 23 // |BundlesFrontendResources| returns |true|. |
24 virtual std::string GetFrontendResource(const std::string& path) = 0; | 24 virtual std::string GetFrontendResource(const std::string& path) = 0; |
| 25 |
| 26 // Get a thumbnail for a given page. Returns non-empty string iff we have the |
| 27 // thumbnail. |
| 28 virtual std::string GetPageThumbnailData(const GURL& url) = 0; |
25 }; | 29 }; |
26 | 30 |
27 } // namespace devtools_http_handler | 31 } // namespace devtools_http_handler |
28 | 32 |
29 #endif // COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_ | 33 #endif // COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_ |
OLD | NEW |