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/debugger/devtools_http_protocol_handler.h" | 5 #include "chrome/browser/debugger/devtools_http_protocol_handler.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 if (entry == NULL || !entry->url().is_valid()) | 246 if (entry == NULL || !entry->url().is_valid()) |
247 continue; | 247 continue; |
248 | 248 |
249 DevToolsClientHost* client_host = DevToolsManager::GetInstance()-> | 249 DevToolsClientHost* client_host = DevToolsManager::GetInstance()-> |
250 GetDevToolsClientHostFor(tab_contents->tab_contents()-> | 250 GetDevToolsClientHostFor(tab_contents->tab_contents()-> |
251 render_view_host()); | 251 render_view_host()); |
252 PageInfo page_info; | 252 PageInfo page_info; |
253 page_info.id = controller.session_id().id(); | 253 page_info.id = controller.session_id().id(); |
254 page_info.attached = client_host != NULL; | 254 page_info.attached = client_host != NULL; |
255 page_info.url = entry->url().spec(); | 255 page_info.url = entry->url().spec(); |
256 page_info.title = UTF16ToUTF8(entry->title()); | 256 // TODO(evan): use directionality of title? |
| 257 // http://code.google.com/p/chromium/issues/detail?id=27094 |
| 258 page_info.title = UTF16ToUTF8(entry->title().string()); |
257 page_info.favicon_url = entry->favicon().url().spec(); | 259 page_info.favicon_url = entry->favicon().url().spec(); |
258 page_list.push_back(page_info); | 260 page_list.push_back(page_info); |
259 } | 261 } |
260 return page_list; | 262 return page_list; |
261 } | 263 } |
262 | 264 |
263 void DevToolsHttpProtocolHandler::OnRootRequestUI( | 265 void DevToolsHttpProtocolHandler::OnRootRequestUI( |
264 int connection_id, | 266 int connection_id, |
265 const net::HttpServerRequestInfo& info) { | 267 const net::HttpServerRequestInfo& info) { |
266 std::string host = info.headers["Host"]; | 268 std::string host = info.headers["Host"]; |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 for (InspectableTabs::iterator it = inspectable_tabs.begin(); | 551 for (InspectableTabs::iterator it = inspectable_tabs.begin(); |
550 it != inspectable_tabs.end(); ++it) { | 552 it != inspectable_tabs.end(); ++it) { |
551 TabContentsWrapper* tab_contents = *it; | 553 TabContentsWrapper* tab_contents = *it; |
552 NavigationController& controller = | 554 NavigationController& controller = |
553 tab_contents->controller(); | 555 tab_contents->controller(); |
554 if (controller.session_id().id() == session_id) | 556 if (controller.session_id().id() == session_id) |
555 return controller.tab_contents(); | 557 return controller.tab_contents(); |
556 } | 558 } |
557 return NULL; | 559 return NULL; |
558 } | 560 } |
OLD | NEW |