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

Unified Diff: chrome/browser/automation/automation_provider_json.h

Issue 8804011: WebDriver extension support in TestingAutomationProvider. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix comments and minor issues 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_json.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/automation_provider_json.h
diff --git a/chrome/browser/automation/automation_provider_json.h b/chrome/browser/automation/automation_provider_json.h
index 0c1ba7d00c7ba2bb59935121a0743107dec63679..b7a86748f409a291e902ac421beae6fc3beef558 100644
--- a/chrome/browser/automation/automation_provider_json.h
+++ b/chrome/browser/automation/automation_provider_json.h
@@ -15,6 +15,7 @@
class AutomationId;
class AutomationProvider;
class Browser;
+class Extension;
class Profile;
class RenderViewHost;
class TabContents;
@@ -80,7 +81,7 @@ bool GetBrowserAndTabFromJSONArgs(base::DictionaryValue* args,
// Returns true on success and sets |id|. Otherwise, |error| will be set.
bool GetAutomationIdFromJSONArgs(
base::DictionaryValue* args,
- const std::string& key_name,
+ const std::string& key,
AutomationId* id,
std::string* error) WARN_UNUSED_RESULT;
@@ -94,4 +95,26 @@ bool GetRenderViewFromJSONArgs(
RenderViewHost** rvh,
std::string* error) WARN_UNUSED_RESULT;
+// Gets the extension specified by the given dictionary |args|. |args|
+// should contain the given key which refers to an extension ID. Returns
+// true on success and sets |extension|. Otherwise, |error| will be set.
+// The retrieved extension may be disabled or crashed.
+bool GetExtensionFromJSONArgs(
+ base::DictionaryValue* args,
+ const std::string& key,
+ Profile* profile,
+ const Extension** extension,
+ std::string* error) WARN_UNUSED_RESULT;
+
+// Gets the enabled extension specified by the given dictionary |args|. |args|
+// should contain the given key which refers to an extension ID. Returns
+// true on success and sets |extension|. Otherwise, |error| will be set.
+// The retrieved extension will not be disabled or crashed.
+bool GetEnabledExtensionFromJSONArgs(
+ base::DictionaryValue* args,
+ const std::string& key,
+ Profile* profile,
+ const Extension** extension,
+ std::string* error) WARN_UNUSED_RESULT;
+
#endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_JSON_H_
« 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