| 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 #ifndef CHROME_COMMON_AUTOMATION_ID_H_ | 5 #ifndef CHROME_COMMON_AUTOMATION_ID_H_ |
| 6 #define CHROME_COMMON_AUTOMATION_ID_H_ | 6 #define CHROME_COMMON_AUTOMATION_ID_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class AutomationId { | 21 class AutomationId { |
| 22 public: | 22 public: |
| 23 // The value of each entry should be preserved. | 23 // The value of each entry should be preserved. |
| 24 enum Type { | 24 enum Type { |
| 25 kTypeInvalid = 0, | 25 kTypeInvalid = 0, |
| 26 kTypeTab, | 26 kTypeTab, |
| 27 kTypeExtensionPopup, | 27 kTypeExtensionPopup, |
| 28 kTypeExtensionBgPage, | 28 kTypeExtensionBgPage, |
| 29 kTypeExtensionInfobar, | 29 kTypeExtensionInfobar, |
| 30 kTypeExtension, | 30 kTypeExtension, |
| 31 kTypeAppShell, |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 static bool FromValue( | 34 static bool FromValue( |
| 34 base::Value* value, AutomationId* id, std::string* error); | 35 base::Value* value, AutomationId* id, std::string* error); |
| 35 static bool FromValueInDictionary( | 36 static bool FromValueInDictionary( |
| 36 base::DictionaryValue* dict, const std::string& key, AutomationId* id, | 37 base::DictionaryValue* dict, const std::string& key, AutomationId* id, |
| 37 std::string* error); | 38 std::string* error); |
| 38 | 39 |
| 39 // Constructs an invalid ID. | 40 // Constructs an invalid ID. |
| 40 AutomationId(); | 41 AutomationId(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 52 | 53 |
| 53 Type type() const; | 54 Type type() const; |
| 54 const std::string& id() const; | 55 const std::string& id() const; |
| 55 | 56 |
| 56 private: | 57 private: |
| 57 Type type_; | 58 Type type_; |
| 58 std::string id_; | 59 std::string id_; |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 #endif // CHROME_COMMON_AUTOMATION_ID_H_ | 62 #endif // CHROME_COMMON_AUTOMATION_ID_H_ |
| OLD | NEW |