summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_extension_function.h
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 15:18:04 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-06 15:18:04 +0000
commit7419d4b42d6be9b4b0f93c3fc4a85ca104e24821 (patch)
tree93896973bafb635a55e3595bb772356b21b405d0 /chrome/browser/automation/automation_extension_function.h
parente608d5644b2b4c76ffad9a7d443f338746256e8b (diff)
downloadchromium_src-7419d4b42d6be9b4b0f93c3fc4a85ca104e24821.zip
chromium_src-7419d4b42d6be9b4b0f93c3fc4a85ca104e24821.tar.gz
chromium_src-7419d4b42d6be9b4b0f93c3fc4a85ca104e24821.tar.bz2
Remove extension automation support that was used only by CEEE.
BUG=none TEST=all automated tests pass Review URL: http://codereview.chromium.org/6756044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80626 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_extension_function.h')
-rw-r--r--chrome/browser/automation/automation_extension_function.h78
1 files changed, 0 insertions, 78 deletions
diff --git a/chrome/browser/automation/automation_extension_function.h b/chrome/browser/automation/automation_extension_function.h
deleted file mode 100644
index 275d3c9..0000000
--- a/chrome/browser/automation/automation_extension_function.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Defines AutomationExtensionFunction.
-
-#ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_EXTENSION_FUNCTION_H_
-#define CHROME_BROWSER_AUTOMATION_AUTOMATION_EXTENSION_FUNCTION_H_
-#pragma once
-
-#include <map>
-#include <string>
-#include <vector>
-
-#include "chrome/browser/extensions/extension_function.h"
-
-class RenderViewHost;
-class TabContents;
-
-// An extension function that pipes the extension API call through the
-// automation interface, so that extensions can be tested using UITests.
-class AutomationExtensionFunction : public AsyncExtensionFunction {
- public:
- AutomationExtensionFunction();
-
- // ExtensionFunction implementation.
- virtual void SetArgs(const ListValue* args);
- virtual const std::string GetResult();
- virtual bool RunImpl();
-
- static ExtensionFunction* Factory();
-
- // Enable API automation of selected APIs. Overridden extension API messages
- // will be routed to the automation client attached to |api_handler_tab|.
- //
- // If the list of enabled functions is non-empty, we enable according to the
- // list ("*" means enable all, otherwise we enable individual named
- // functions). An empty list makes this function a no-op.
- //
- // Note that all calls to this function are additive. Functions previously
- // enabled will remain enabled until you call Disable().
- //
- // Calling this function after enabling one or more functions with a
- // tab other than the one previously used is an error.
- static void Enable(TabContents* api_handler_tab,
- const std::vector<std::string>& functions_enabled);
-
- // Restore the default API function implementations and reset the stored
- // API handler.
- static void Disable();
-
- // Intercepts messages sent from the external host to check if they
- // are actually responses to extension API calls. If they are, redirects
- // the message to respond to the pending asynchronous API call and returns
- // true, otherwise returns false to indicate the message was not intercepted.
- static bool InterceptMessageFromExternalHost(RenderViewHost* view_host,
- const std::string& message,
- const std::string& origin,
- const std::string& target);
-
- private:
- ~AutomationExtensionFunction();
-
- // Weak reference, lifetime managed by the ExternalTabContainer instance
- // owning the TabContents in question.
- static TabContents* api_handler_tab_;
-
- typedef std::map<int, scoped_refptr<AutomationExtensionFunction> >
- PendingFunctionsMap;
- static PendingFunctionsMap pending_functions_;
-
- std::string args_;
- std::string json_result_;
-
- DISALLOW_COPY_AND_ASSIGN(AutomationExtensionFunction);
-};
-
-#endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_EXTENSION_FUNCTION_H_