OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This file contains implementations of the DebuggerRemoteService methods, | 5 // This file contains implementations of the DebuggerRemoteService methods, |
6 // defines DebuggerRemoteService and DebuggerRemoteServiceCommand constants. | 6 // defines DebuggerRemoteService and DebuggerRemoteServiceCommand constants. |
7 | 7 |
8 #include "chrome/browser/debugger/debugger_remote_service.h" | 8 #include "chrome/browser/debugger/debugger_remote_service.h" |
9 | 9 |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
16 #include "chrome/browser/debugger/devtools_manager.h" | 16 #include "chrome/browser/debugger/devtools_manager.h" |
17 #include "chrome/browser/debugger/devtools_protocol_handler.h" | 17 #include "chrome/browser/debugger/devtools_protocol_handler.h" |
18 #include "chrome/browser/debugger/devtools_remote_message.h" | 18 #include "chrome/browser/debugger/devtools_remote_message.h" |
19 #include "chrome/browser/debugger/inspectable_tab_proxy.h" | 19 #include "chrome/browser/debugger/inspectable_tab_proxy.h" |
20 #include "chrome/browser/renderer_host/render_view_host.h" | 20 #include "chrome/browser/renderer_host/render_view_host.h" |
21 #include "chrome/browser/tab_contents/tab_contents.h" | 21 #include "chrome/browser/tab_contents/tab_contents.h" |
22 #include "chrome/common/devtools_messages.h" | 22 #include "chrome/common/devtools_messages.h" |
23 #include "chrome/common/render_messages.h" | 23 #include "chrome/common/render_messages.h" |
| 24 #include "chrome/common/render_messages_params.h" |
24 | 25 |
25 namespace { | 26 namespace { |
26 | 27 |
27 // Constants for the "data", "result", and "command" JSON message fields. | 28 // Constants for the "data", "result", and "command" JSON message fields. |
28 const char kDataKey[] = "data"; | 29 const char kDataKey[] = "data"; |
29 const char kResultKey[] = "result"; | 30 const char kResultKey[] = "result"; |
30 const char kCommandKey[] = "command"; | 31 const char kCommandKey[] = "command"; |
31 | 32 |
32 } // namespace | 33 } // namespace |
33 | 34 |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 return true; | 330 return true; |
330 } | 331 } |
331 std::string javascript; | 332 std::string javascript; |
332 content->GetString(kDataKey, &javascript); | 333 content->GetString(kDataKey, &javascript); |
333 render_view_host->Send( | 334 render_view_host->Send( |
334 new ViewMsg_ScriptEvalRequest(render_view_host->routing_id(), | 335 new ViewMsg_ScriptEvalRequest(render_view_host->routing_id(), |
335 L"", | 336 L"", |
336 UTF8ToWide(javascript))); | 337 UTF8ToWide(javascript))); |
337 return false; | 338 return false; |
338 } | 339 } |
OLD | NEW |