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 "content/renderer/dom_automation_controller.h" | 5 #include "content/renderer/dom_automation_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/json/json_string_value_serializer.h" | 9 #include "base/json/json_string_value_serializer.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/metrics/statistics_recorder.h" | 11 #include "base/metrics/statistics_recorder.h" |
12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "content/common/child_process_messages.h" | 13 #include "content/common/child_process_messages.h" |
14 #include "content/common/view_messages.h" | 14 #include "content/common/view_messages.h" |
15 | 15 |
16 using webkit_glue::CppArgumentList; | |
17 using webkit_glue::CppVariant; | |
18 | |
19 namespace content { | 16 namespace content { |
20 | 17 |
21 DomAutomationController::DomAutomationController() | 18 DomAutomationController::DomAutomationController() |
22 : sender_(NULL), | 19 : sender_(NULL), |
23 routing_id_(MSG_ROUTING_NONE), | 20 routing_id_(MSG_ROUTING_NONE), |
24 automation_id_(MSG_ROUTING_NONE) { | 21 automation_id_(MSG_ROUTING_NONE) { |
25 BindCallback("send", base::Bind(&DomAutomationController::Send, | 22 BindCallback("send", base::Bind(&DomAutomationController::Send, |
26 base::Unretained(this))); | 23 base::Unretained(this))); |
27 BindCallback("setAutomationId", | 24 BindCallback("setAutomationId", |
28 base::Bind(&DomAutomationController::SetAutomationId, | 25 base::Bind(&DomAutomationController::SetAutomationId, |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 if (!args[0].isNumber()) { | 162 if (!args[0].isNumber()) { |
166 result->SetNull(); | 163 result->SetNull(); |
167 return; | 164 return; |
168 } | 165 } |
169 | 166 |
170 automation_id_ = args[0].ToInt32(); | 167 automation_id_ = args[0].ToInt32(); |
171 result->Set(true); | 168 result->Set(true); |
172 } | 169 } |
173 | 170 |
174 } // namespace content | 171 } // namespace content |
OLD | NEW |