| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 141 } |
| 142 | 142 |
| 143 int WebViewId::tab_id() const { | 143 int WebViewId::tab_id() const { |
| 144 return tab_id_; | 144 return tab_id_; |
| 145 } | 145 } |
| 146 | 146 |
| 147 bool WebViewId::old_style() const { | 147 bool WebViewId::old_style() const { |
| 148 return old_style_; | 148 return old_style_; |
| 149 } | 149 } |
| 150 | 150 |
| 151 bool WebViewId::IsAppShell() const { |
| 152 return id_.type() == AutomationId::kTypeAppShell; |
| 153 } |
| 154 |
| 151 // static | 155 // static |
| 152 WebViewLocator WebViewLocator::ForIndexPair(int browser_index, int tab_index) { | 156 WebViewLocator WebViewLocator::ForIndexPair(int browser_index, int tab_index) { |
| 153 WebViewLocator locator; | 157 WebViewLocator locator; |
| 154 locator.type_ = kTypeIndexPair; | 158 locator.type_ = kTypeIndexPair; |
| 155 locator.locator_.index_pair.browser_index = browser_index; | 159 locator.locator_.index_pair.browser_index = browser_index; |
| 156 locator.locator_.index_pair.tab_index = tab_index; | 160 locator.locator_.index_pair.tab_index = tab_index; |
| 157 return locator; | 161 return locator; |
| 158 } | 162 } |
| 159 | 163 |
| 160 // static | 164 // static |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 | 937 |
| 934 bool SendOverrideGeolocationJSONRequest( | 938 bool SendOverrideGeolocationJSONRequest( |
| 935 AutomationMessageSender* sender, | 939 AutomationMessageSender* sender, |
| 936 const base::DictionaryValue* geolocation, | 940 const base::DictionaryValue* geolocation, |
| 937 Error* error) { | 941 Error* error) { |
| 938 scoped_ptr<DictionaryValue> dict(geolocation->DeepCopy()); | 942 scoped_ptr<DictionaryValue> dict(geolocation->DeepCopy()); |
| 939 dict->SetString("command", "OverrideGeoposition"); | 943 dict->SetString("command", "OverrideGeoposition"); |
| 940 DictionaryValue reply_dict; | 944 DictionaryValue reply_dict; |
| 941 return SendAutomationJSONRequest(sender, *dict.get(), &reply_dict, error); | 945 return SendAutomationJSONRequest(sender, *dict.get(), &reply_dict, error); |
| 942 } | 946 } |
| OLD | NEW |