summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-23 03:55:54 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-23 03:55:54 +0000
commit7c4ddc45fc07c653733e260f9814f25d85594717 (patch)
treea4c715a1c9e65c7c353d57ccd2aabbe06fab2977 /chrome/browser/automation
parentfa8a2b1b050009d67e03cf03a26d7d558afe0ecb (diff)
downloadchromium_src-7c4ddc45fc07c653733e260f9814f25d85594717.zip
chromium_src-7c4ddc45fc07c653733e260f9814f25d85594717.tar.gz
chromium_src-7c4ddc45fc07c653733e260f9814f25d85594717.tar.bz2
Committing issue 113734 for Joi.
Description: Make sure extension_uitest.cc is actually built (my bad - got confused about the whole .gyp vs. .sln thing). Also, to get things building now that extension_uitest.cc is built, shuffle the extension automation constants around so they end up in the browser library (I didn't realize the UI tests are already linking with that, and the linker was bringing in the automation_extension_function.obj file ended up causing lots of unresolved linker problems). Note that this did build the other day when I submitted the file originally, but it must have been essentially a fluke that the linker chose the other .obj file to get the constants. BUG=none TEST=none Original issue: http://codereview.chromium.org/113734 Review URL: http://codereview.chromium.org/113788 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r--chrome/browser/automation/automation_extension_function.cc9
-rw-r--r--chrome/browser/automation/extension_automation_constants.cc28
-rw-r--r--chrome/browser/automation/extension_automation_constants.h40
3 files changed, 69 insertions, 8 deletions
diff --git a/chrome/browser/automation/automation_extension_function.cc b/chrome/browser/automation/automation_extension_function.cc
index 314718a..776866e 100644
--- a/chrome/browser/automation/automation_extension_function.cc
+++ b/chrome/browser/automation/automation_extension_function.cc
@@ -8,16 +8,9 @@
#include "base/json_reader.h"
#include "base/json_writer.h"
+#include "chrome/browser/automation/extension_automation_constants.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
#include "chrome/browser/renderer_host/render_view_host.h"
-#include "chrome/test/automation/extension_automation_constants.h"
-
-// We are the only compilation unit outside of test code that needs the
-// definition of these constants. Including the .cc file here instead of
-// putting it into chrome.gyp (SCons builds on Linux don't like it when you
-// have the same file in two different projects) or linking to the test support
-// lib.
-#include "chrome/test/automation/extension_automation_constants.cc"
bool AutomationExtensionFunction::enabled_ = false;
diff --git a/chrome/browser/automation/extension_automation_constants.cc b/chrome/browser/automation/extension_automation_constants.cc
new file mode 100644
index 0000000..425c634
--- /dev/null
+++ b/chrome/browser/automation/extension_automation_constants.cc
@@ -0,0 +1,28 @@
+// 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.
+
+#include "chrome/browser/automation/extension_automation_constants.h"
+
+namespace extension_automation_constants {
+
+const char kAutomationOrigin[] = "__priv_xtapi";
+const wchar_t kAutomationRequestIdKey[] = L"rqid";
+
+const wchar_t kAutomationHasCallbackKey[] = L"hascb";
+const wchar_t kAutomationErrorKey[] = L"err";
+const wchar_t kAutomationNameKey[] = L"name";
+const wchar_t kAutomationArgsKey[] = L"args";
+const wchar_t kAutomationResponseKey[] = L"res";
+const char kAutomationRequestTarget[] = "__priv_xtreq";
+const char kAutomationResponseTarget[] = "__priv_xtres";
+
+const wchar_t kAutomationConnectionIdKey[] = L"connid";
+const wchar_t kAutomationMessageDataKey[] = L"data";
+const wchar_t kAutomationExtensionIdKey[] = L"extid";
+const wchar_t kAutomationPortIdKey[] = L"portid";
+const char kAutomationPortRequestTarget[] = "__priv_prtreq";
+const char kAutomationPortResponseTarget[] = "__priv_prtres";
+
+
+} // namespace extension_automation_constants
diff --git a/chrome/browser/automation/extension_automation_constants.h b/chrome/browser/automation/extension_automation_constants.h
new file mode 100644
index 0000000..1c44548
--- /dev/null
+++ b/chrome/browser/automation/extension_automation_constants.h
@@ -0,0 +1,40 @@
+// 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.
+
+// Constants used to encode requests and responses for automation.
+
+#ifndef CHROME_BROWSER_AUTOMATION_EXTENSION_AUTOMATION_CONSTANTS_H_
+#define CHROME_BROWSER_AUTOMATION_EXTENSION_AUTOMATION_CONSTANTS_H_
+
+namespace extension_automation_constants {
+
+// All extension automation related messages will have this origin.
+extern const char kAutomationOrigin[];
+// Key used for all extension automation request types.
+extern const wchar_t kAutomationRequestIdKey[];
+
+// Keys used for API communications
+extern const wchar_t kAutomationHasCallbackKey[];
+extern const wchar_t kAutomationErrorKey[]; // not present implies success
+extern const wchar_t kAutomationNameKey[];
+extern const wchar_t kAutomationArgsKey[];
+extern const wchar_t kAutomationResponseKey[];
+// All external API requests have this target.
+extern const char kAutomationRequestTarget[];
+// All API responses should have this target.
+extern const char kAutomationResponseTarget[];
+
+// Keys used for port communications
+extern const wchar_t kAutomationConnectionIdKey[];
+extern const wchar_t kAutomationMessageDataKey[];
+extern const wchar_t kAutomationExtensionIdKey[];
+extern const wchar_t kAutomationPortIdKey[];
+// All external port message requests should have this target.
+extern const char kAutomationPortRequestTarget[];
+// All external port message responses have this target.
+extern const char kAutomationPortResponseTarget[];
+
+}; // namespace automation_extension_constants
+
+#endif // CHROME_BROWSER_AUTOMATION_EXTENSION_AUTOMATION_CONSTANTS_H_