Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / components / devtools_http_handler / devtools_http_handler_delegate.h
blobcf4b9db7c74ebfcaca050e954585189b88b7bd8a
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 COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_
6 #define COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_
8 #include <string>
10 #include "url/gurl.h"
12 namespace content {
13 class DevToolsExternalAgentProxyDelegate;
16 namespace devtools_http_handler {
18 class DevToolsHttpHandlerDelegate {
19 public:
20 virtual ~DevToolsHttpHandlerDelegate() {}
22 // Should return discovery page HTML that should list available tabs
23 // and provide attach links.
24 virtual std::string GetDiscoveryPageHTML() = 0;
26 // Returns frontend resource data by |path|. Only used if
27 // |BundlesFrontendResources| returns |true|.
28 virtual std::string GetFrontendResource(const std::string& path) = 0;
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;
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;
40 } // namespace devtools_http_handler
42 #endif // COMPONENTS_DEVTOOLS_HTTP_HANDLER_DEVTOOLS_HTTP_HANDLER_DELEGATE_H_