Chromium Code Reviews| 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 // Support utilities for the JSON automation interface used by PyAuto. | 5 // Support utilities for the JSON automation interface used by PyAuto. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_JSON_H_ | 7 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_JSON_H_ |
| 8 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_JSON_H_ | 8 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_JSON_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 | 14 |
| 15 class AutomationId; | |
| 15 class AutomationProvider; | 16 class AutomationProvider; |
| 16 class Browser; | 17 class Browser; |
| 18 class Profile; | |
| 19 class RenderViewHost; | |
| 17 class TabContents; | 20 class TabContents; |
| 21 class TabContentsWrapper; | |
|
dennis_jeffrey
2011/12/03 00:19:37
Where is this needed?
kkania
2011/12/03 00:34:31
Removed.
| |
| 18 | 22 |
| 19 namespace base { | 23 namespace base { |
| 20 class DictionaryValue; | 24 class DictionaryValue; |
| 21 class Value; | 25 class Value; |
| 22 } | 26 } |
| 23 | 27 |
| 24 namespace IPC { | 28 namespace IPC { |
| 25 class Message; | 29 class Message; |
| 26 } | 30 } |
| 27 | 31 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 // Gets the browser and tab specified by the given dictionary |args|. |args| | 70 // Gets the browser and tab specified by the given dictionary |args|. |args| |
| 67 // should contain a key 'windex' which refers to the index of the browser and | 71 // should contain a key 'windex' which refers to the index of the browser and |
| 68 // a key 'tab_index' which refers to the index of the tab in that browser. | 72 // a key 'tab_index' which refers to the index of the tab in that browser. |
| 69 // Returns true on success and sets |browser| and |tab|. Otherwise, |error| | 73 // Returns true on success and sets |browser| and |tab|. Otherwise, |error| |
| 70 // will be set. | 74 // will be set. |
| 71 bool GetBrowserAndTabFromJSONArgs(base::DictionaryValue* args, | 75 bool GetBrowserAndTabFromJSONArgs(base::DictionaryValue* args, |
| 72 Browser** browser, | 76 Browser** browser, |
| 73 TabContents** tab, | 77 TabContents** tab, |
| 74 std::string* error) WARN_UNUSED_RESULT; | 78 std::string* error) WARN_UNUSED_RESULT; |
| 75 | 79 |
| 80 // Gets an automation ID from the given value in the given dicitionary |args|. | |
| 81 // Returns true on success and sets |id|. Otherwise, |error| will be set. | |
| 82 bool GetAutomationIdFromJSONArgs( | |
| 83 base::DictionaryValue* args, | |
| 84 const std::string& key_name, | |
| 85 AutomationId* id, | |
| 86 std::string* error) WARN_UNUSED_RESULT; | |
| 87 | |
| 88 // Gets the render view specified by the given dictionary |args|. |args| | |
| 89 // should contain a key 'view_id' which refers to an automation ID for the | |
| 90 // render view. Returns true on success and sets |rvh|. Otherwise, |error| | |
| 91 // will be set. | |
| 92 bool GetRenderViewFromJSONArgs( | |
| 93 base::DictionaryValue* args, | |
| 94 Profile* profile, | |
| 95 RenderViewHost** rvh, | |
| 96 std::string* error) WARN_UNUSED_RESULT; | |
| 97 | |
| 76 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_JSON_H_ | 98 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_JSON_H_ |
| OLD | NEW |