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

Side by Side Diff: components/devtools_http_handler/devtools_http_handler_delegate.h

Issue 2295623002: DevTools: simplify http handler delegate as it is moving into content. (Closed)
Patch Set: lcean Created 4 years, 3 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
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 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 "url/gurl.h" 10 #include "url/gurl.h"
11 11
12 namespace content { 12 namespace content {
13 class DevToolsExternalAgentProxyDelegate; 13 class DevToolsExternalAgentProxyDelegate;
14 } 14 }
15 15
16 namespace devtools_http_handler { 16 namespace devtools_http_handler {
17 17
18 class DevToolsHttpHandlerDelegate { 18 class DevToolsHttpHandlerDelegate {
19 public: 19 public:
20 virtual ~DevToolsHttpHandlerDelegate() {} 20 virtual ~DevToolsHttpHandlerDelegate() {}
21 21
22 // Should return discovery page HTML that should list available tabs 22 // Should return discovery page HTML that should list available tabs
23 // and provide attach links. 23 // and provide attach links.
24 virtual std::string GetDiscoveryPageHTML() = 0; 24 virtual std::string GetDiscoveryPageHTML() = 0;
25 25
26 // Returns frontend resource data by |path|. Only used if 26 // Returns frontend resource data by |path|. Only used if
27 // |BundlesFrontendResources| returns |true|. 27 // |BundlesFrontendResources| returns |true|.
28 virtual std::string GetFrontendResource(const std::string& path) = 0; 28 virtual std::string GetFrontendResource(const std::string& path) = 0;
29
30 // Get a thumbnail for a given page. Returns non-empty string iff we have the
31 // thumbnail.
32 virtual std::string GetPageThumbnailData(const GURL& url) = 0;
33
34 // Allows embedder to handle custom websocket-based protocol connection
35 // pointing remote debugging port. Returns ownership.
36 virtual content::DevToolsExternalAgentProxyDelegate*
37 HandleWebSocketConnection(const std::string& path) = 0;
38 }; 29 };
39 30
40 } // namespace devtools_http_handler 31 } // namespace devtools_http_handler
41 32
42 #endif // COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_ 33 #endif // COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698