OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "chrome/browser/net/chrome_url_request_context.h" | 8 #include "chrome/browser/net/chrome_url_request_context.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" | 10 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" |
11 #include "chrome/common/devtools_messages.h" | |
12 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
13 #include "content/browser/browser_thread.h" | 12 #include "content/browser/browser_thread.h" |
14 #include "content/browser/renderer_host/render_view_host.h" | 13 #include "content/browser/renderer_host/render_view_host.h" |
15 #include "content/browser/tab_contents/tab_contents.h" | 14 #include "content/browser/tab_contents/tab_contents.h" |
| 15 #include "content/common/devtools_messages.h" |
16 #include "grit/devtools_resources_map.h" | 16 #include "grit/devtools_resources_map.h" |
17 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 std::string PathWithoutParams(const std::string& path) { | 21 std::string PathWithoutParams(const std::string& path) { |
22 return GURL(std::string("chrome-devtools://devtools/") + path) | 22 return GURL(std::string("chrome-devtools://devtools/") + path) |
23 .path().substr(1); | 23 .path().substr(1); |
24 } | 24 } |
25 | 25 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 DevToolsUI::DevToolsUI(TabContents* contents) : WebUI(contents) { | 99 DevToolsUI::DevToolsUI(TabContents* contents) : WebUI(contents) { |
100 DevToolsDataSource* data_source = new DevToolsDataSource(); | 100 DevToolsDataSource* data_source = new DevToolsDataSource(); |
101 contents->profile()->GetChromeURLDataManager()->AddDataSource(data_source); | 101 contents->profile()->GetChromeURLDataManager()->AddDataSource(data_source); |
102 } | 102 } |
103 | 103 |
104 void DevToolsUI::RenderViewCreated(RenderViewHost* render_view_host) { | 104 void DevToolsUI::RenderViewCreated(RenderViewHost* render_view_host) { |
105 render_view_host->Send(new DevToolsMsg_SetupDevToolsClient( | 105 render_view_host->Send(new DevToolsMsg_SetupDevToolsClient( |
106 render_view_host->routing_id())); | 106 render_view_host->routing_id())); |
107 } | 107 } |
OLD | NEW |