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/test/automation/automation_json_requests.h" | 5 #include "chrome/test/automation/automation_json_requests.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 // TODO(kkania): Set correct auto_id instead of hardcoding windex. | 926 // TODO(kkania): Set correct auto_id instead of hardcoding windex. |
927 dict.SetInteger("windex", 0); | 927 dict.SetInteger("windex", 0); |
928 dict.SetString("path", pref); | 928 dict.SetString("path", pref); |
929 dict.Set("value", value); | 929 dict.Set("value", value); |
930 DictionaryValue reply_dict; | 930 DictionaryValue reply_dict; |
931 return SendAutomationJSONRequest(sender, dict, &reply_dict, error); | 931 return SendAutomationJSONRequest(sender, dict, &reply_dict, error); |
932 } | 932 } |
933 | 933 |
934 bool SendOverrideGeolocationJSONRequest( | 934 bool SendOverrideGeolocationJSONRequest( |
935 AutomationMessageSender* sender, | 935 AutomationMessageSender* sender, |
936 base::DictionaryValue* geolocation, | 936 const base::DictionaryValue* geolocation, |
937 Error* error) { | 937 Error* error) { |
938 scoped_ptr<DictionaryValue> dict(geolocation->DeepCopy()); | 938 scoped_ptr<DictionaryValue> dict(geolocation->DeepCopy()); |
939 dict->SetString("command", "OverrideGeoposition"); | 939 dict->SetString("command", "OverrideGeoposition"); |
940 DictionaryValue reply_dict; | 940 DictionaryValue reply_dict; |
941 return SendAutomationJSONRequest(sender, *dict.get(), &reply_dict, error); | 941 return SendAutomationJSONRequest(sender, *dict.get(), &reply_dict, error); |
942 } | 942 } |
OLD | NEW |