2012-04-03 03:34:16 +02:00
|
|
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_DEVTOOLS_DELEGATE_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_DEVTOOLS_DELEGATE_H_
|
|
|
|
#pragma once
|
|
|
|
|
2013-01-15 20:12:28 +01:00
|
|
|
#include <map>
|
2012-04-03 03:34:16 +02:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "base/basictypes.h"
|
|
|
|
#include "base/compiler_specific.h"
|
2012-04-27 00:20:18 +02:00
|
|
|
#include "base/memory/scoped_ptr.h"
|
2013-01-15 20:12:28 +01:00
|
|
|
#include "content/public/browser/devtools_agent_host.h"
|
2012-04-27 00:20:18 +02:00
|
|
|
#include "content/public/browser/devtools_http_handler.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
#include "content/public/browser/devtools_http_handler_delegate.h"
|
|
|
|
|
|
|
|
namespace content {
|
2012-04-27 00:20:18 +02:00
|
|
|
class RenderViewHost;
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
|
|
|
|
public:
|
2012-10-04 21:17:13 +02:00
|
|
|
explicit CefDevToolsDelegate(int port);
|
2012-04-03 03:34:16 +02:00
|
|
|
virtual ~CefDevToolsDelegate();
|
|
|
|
|
|
|
|
// Stops http server.
|
|
|
|
void Stop();
|
|
|
|
|
|
|
|
// DevToolsHttpProtocolHandler::Delegate overrides.
|
|
|
|
virtual std::string GetDiscoveryPageHTML() OVERRIDE;
|
|
|
|
virtual bool BundlesFrontendResources() OVERRIDE;
|
2013-02-23 01:43:28 +01:00
|
|
|
virtual base::FilePath GetDebugFrontendDir() OVERRIDE;
|
2012-10-04 21:17:13 +02:00
|
|
|
virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE;
|
2013-10-29 18:53:18 +01:00
|
|
|
virtual scoped_ptr<content::DevToolsTarget> CreateNewTarget(const GURL& url)
|
|
|
|
OVERRIDE;
|
2013-10-17 01:09:07 +02:00
|
|
|
virtual scoped_ptr<content::DevToolsTarget> CreateTargetForId(
|
|
|
|
const std::string& id) OVERRIDE;
|
|
|
|
virtual void EnumerateTargets(TargetCallback callback) OVERRIDE;
|
2013-10-16 02:25:38 +02:00
|
|
|
virtual scoped_ptr<net::StreamListenSocket> CreateSocketForTethering(
|
2013-05-07 23:48:34 +02:00
|
|
|
net::StreamListenSocket::Delegate* delegate,
|
|
|
|
std::string* name) OVERRIDE;
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2012-04-27 00:20:18 +02:00
|
|
|
// Returns the DevTools URL for the specified RenderViewHost.
|
2012-05-18 17:04:56 +02:00
|
|
|
std::string GetDevToolsURL(content::RenderViewHost* rvh, bool http_scheme);
|
2012-04-27 00:20:18 +02:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
private:
|
|
|
|
content::DevToolsHttpHandler* devtools_http_handler_;
|
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefDevToolsDelegate);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_DEVTOOLS_DELEGATE_H_
|