Loosen up heuristics for detecting account creation forms.
[chromium-blink-merge.git] / content / shell / shell_devtools_delegate.cc
blob1c79ea18e50cecef2abe5225c6a60c4bc0552c13
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 #include "content/shell/shell_devtools_delegate.h"
7 #include "content/public/browser/devtools_http_handler.h"
8 #include "grit/shell_resources.h"
9 #include "net/base/tcp_listen_socket.h"
10 #include "net/url_request/url_request_context_getter.h"
11 #include "ui/base/layout.h"
12 #include "ui/base/resource/resource_bundle.h"
14 namespace content {
16 ShellDevToolsDelegate::ShellDevToolsDelegate(
17 int port,
18 net::URLRequestContextGetter* context_getter)
19 : context_getter_(context_getter) {
20 devtools_http_handler_ = DevToolsHttpHandler::Start(
21 new net::TCPListenSocketFactory("127.0.0.1", port),
22 "",
23 context_getter_,
24 this);
27 ShellDevToolsDelegate::~ShellDevToolsDelegate() {
30 void ShellDevToolsDelegate::Stop() {
31 // The call below destroys this.
32 devtools_http_handler_->Stop();
35 std::string ShellDevToolsDelegate::GetDiscoveryPageHTML() {
36 return ResourceBundle::GetSharedInstance().GetRawDataResource(
37 IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE,
38 ui::SCALE_FACTOR_NONE).as_string();
41 bool ShellDevToolsDelegate::BundlesFrontendResources() {
42 return true;
45 std::string ShellDevToolsDelegate::GetFrontendResourcesBaseURL() {
46 return "";
49 } // namespace content