Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / browser / devtools / xwalk_devtools_delegate.h
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.
4
5 #ifndef XWALK_RUNTIME_BROWSER_DEVTOOLS_XWALK_DEVTOOLS_DELEGATE_H_
6 #define XWALK_RUNTIME_BROWSER_DEVTOOLS_XWALK_DEVTOOLS_DELEGATE_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "content/public/browser/devtools_http_handler_delegate.h"
14
15 namespace content {
16 class DevToolsHttpHandler;
17 }
18
19 namespace xwalk {
20
21 class RuntimeContext;
22
23 class XWalkDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
24  public:
25   explicit XWalkDevToolsDelegate(RuntimeContext* runtime_context);
26   virtual ~XWalkDevToolsDelegate();
27
28  private:
29   // DevToolsHttpProtocolHandler::Delegate overrides.
30   virtual std::string GetDiscoveryPageHTML() OVERRIDE;
31   virtual bool BundlesFrontendResources() OVERRIDE;
32   virtual base::FilePath GetDebugFrontendDir() OVERRIDE;
33   virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE;
34   virtual scoped_ptr<content::DevToolsTarget> CreateNewTarget(
35       const GURL& url) OVERRIDE;
36   virtual void EnumerateTargets(TargetCallback callback) OVERRIDE;
37   virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering(
38       net::StreamListenSocket::Delegate* delegate,
39       std::string* name) OVERRIDE;
40
41   RuntimeContext* runtime_context_;
42
43   DISALLOW_COPY_AND_ASSIGN(XWalkDevToolsDelegate);
44 };
45
46 }  // namespace xwalk
47
48 #endif  // XWALK_RUNTIME_BROWSER_DEVTOOLS_XWALK_DEVTOOLS_DELEGATE_H_