Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: chrome/browser/automation/automation_provider_json.h

Issue 8790003: Allow the automation provider to accept an ID for performing render-view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_json.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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;
18 21
19 namespace base { 22 namespace base {
20 class DictionaryValue; 23 class DictionaryValue;
21 class Value; 24 class Value;
22 } 25 }
23 26
24 namespace IPC { 27 namespace IPC {
25 class Message; 28 class Message;
26 } 29 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // Gets the browser and tab specified by the given dictionary |args|. |args| 69 // 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 70 // 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. 71 // 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| 72 // Returns true on success and sets |browser| and |tab|. Otherwise, |error|
70 // will be set. 73 // will be set.
71 bool GetBrowserAndTabFromJSONArgs(base::DictionaryValue* args, 74 bool GetBrowserAndTabFromJSONArgs(base::DictionaryValue* args,
72 Browser** browser, 75 Browser** browser,
73 TabContents** tab, 76 TabContents** tab,
74 std::string* error) WARN_UNUSED_RESULT; 77 std::string* error) WARN_UNUSED_RESULT;
75 78
79 // Gets an automation ID from the given value in the given dicitionary |args|.
80 // Returns true on success and sets |id|. Otherwise, |error| will be set.
81 bool GetAutomationIdFromJSONArgs(
82 base::DictionaryValue* args,
83 const std::string& key_name,
84 AutomationId* id,
85 std::string* error) WARN_UNUSED_RESULT;
86
87 // Gets the render view specified by the given dictionary |args|. |args|
88 // should contain a key 'view_id' which refers to an automation ID for the
89 // render view. Returns true on success and sets |rvh|. Otherwise, |error|
90 // will be set.
91 bool GetRenderViewFromJSONArgs(
92 base::DictionaryValue* args,
93 Profile* profile,
94 RenderViewHost** rvh,
95 std::string* error) WARN_UNUSED_RESULT;
96
76 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_JSON_H_ 97 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_JSON_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698