| OLD | NEW |
| 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 #include "chrome/browser/ui/webui/devtools_ui.h" | 5 #include "chrome/browser/ui/webui/devtools_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/ref_counted_memory.h" | 9 #include "base/memory/ref_counted_memory.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/string_util.h" | 11 #include "base/strings/string_util.h" |
| 12 #include "base/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
| 13 #include "chrome/browser/net/chrome_url_request_context.h" | 13 #include "chrome/browser/net/chrome_url_request_context.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
| 16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 #include "content/public/browser/devtools_http_handler.h" | 17 #include "content/public/browser/devtools_http_handler.h" |
| 18 #include "content/public/browser/url_data_source.h" | 18 #include "content/public/browser/url_data_source.h" |
| 19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
| 20 #include "content/public/browser/web_ui.h" | 20 #include "content/public/browser/web_ui.h" |
| 21 #include "net/url_request/url_fetcher.h" | 21 #include "net/url_request/url_fetcher.h" |
| 22 #include "net/url_request/url_fetcher_delegate.h" | 22 #include "net/url_request/url_fetcher_delegate.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 url.path().substr(1).c_str())); | 236 url.path().substr(1).c_str())); |
| 237 } | 237 } |
| 238 | 238 |
| 239 DevToolsUI::DevToolsUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 239 DevToolsUI::DevToolsUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| 240 web_ui->SetBindings(0); | 240 web_ui->SetBindings(0); |
| 241 Profile* profile = Profile::FromWebUI(web_ui); | 241 Profile* profile = Profile::FromWebUI(web_ui); |
| 242 content::URLDataSource::Add( | 242 content::URLDataSource::Add( |
| 243 profile, | 243 profile, |
| 244 new DevToolsDataSource(profile->GetRequestContext())); | 244 new DevToolsDataSource(profile->GetRequestContext())); |
| 245 } | 245 } |
| OLD | NEW |