diff options
author | mad@google.com <mad@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-12 19:43:51 +0000 |
---|---|---|
committer | mad@google.com <mad@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-12 19:43:51 +0000 |
commit | 0a97bdd38e742f1b161f7aefce74e1d61529a30d (patch) | |
tree | a8967a135064c346bd6bd413380e0136e6c14b42 /chrome | |
parent | 3bcfb54c25ce23235f53c71669484ed8c1edfa97 (diff) | |
download | chromium_src-0a97bdd38e742f1b161f7aefce74e1d61529a30d.zip chromium_src-0a97bdd38e742f1b161f7aefce74e1d61529a30d.tar.gz chromium_src-0a97bdd38e742f1b161f7aefce74e1d61529a30d.tar.bz2 |
Add constant values for the webNavigation API.
for yzshen's http://codereview.chromium.org/3117011/show
BUG=50943
TEST=none
Review URL: http://codereview.chromium.org/3131014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55912 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/extensions/extension_web_navigation_api_constants.cc | 28 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_web_navigation_api_constants.h | 35 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 2 |
3 files changed, 65 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_web_navigation_api_constants.cc b/chrome/browser/extensions/extension_web_navigation_api_constants.cc new file mode 100644 index 0000000..fb5d01c --- /dev/null +++ b/chrome/browser/extensions/extension_web_navigation_api_constants.cc @@ -0,0 +1,28 @@ +// Copyright (c) 2010 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/extensions/extension_web_navigation_api_constants.h" + +namespace extension_web_navigation_api_constants { + +const wchar_t kErrorKey[] = L"error"; +const wchar_t kFrameIdKey[] = L"frameId"; +const wchar_t kRequestIdKey[] = L"requestId"; +const wchar_t kSourceTabIdKey[] = L"sourceTabId"; +const wchar_t kSourceUrlKey[] = L"sourceUrl"; +const wchar_t kTabIdKey[] = L"tabId"; +const wchar_t kTargetUrlKey[] = L"targetUrl"; +const wchar_t kTimeStampKey[] = L"timeStamp"; +const wchar_t kTransitionTypeKey[] = L"transitionType"; +const wchar_t kUrlKey[] = L"url"; + +const char kOnBeforeNavigate[] = "experimental.webNavigation.onBeforeNavigate"; +const char kOnBeforeRetarget[] = "experimental.webNavigation.onBeforeRetarget"; +const char kOnCommitted[] = "experimental.webNavigation.onCommitted"; +const char kOnCompleted[] = "experimental.webNavigation.onCompleted"; +const char kOnDOMContentLoaded[] = + "experimental.webNavigation.onDOMContentLoaded"; +const char kOnErrorOccurred[] = "experimental.webNavigation.onErrorOccurred"; + +} // namespace extension_web_navigation_api_constants diff --git a/chrome/browser/extensions/extension_web_navigation_api_constants.h b/chrome/browser/extensions/extension_web_navigation_api_constants.h new file mode 100644 index 0000000..c95e543 --- /dev/null +++ b/chrome/browser/extensions/extension_web_navigation_api_constants.h @@ -0,0 +1,35 @@ +// Copyright (c) 2010 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 for the WebNavigation API. + +#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_NAVIGATION_API_CONSTANTS_H_ +#define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_NAVIGATION_API_CONSTANTS_H_ +#pragma once + +namespace extension_web_navigation_api_constants { + +// Keys. +extern const wchar_t kErrorKey[]; +extern const wchar_t kFrameIdKey[]; +extern const wchar_t kRequestIdKey[]; +extern const wchar_t kSourceTabIdKey[]; +extern const wchar_t kSourceUrlKey[]; +extern const wchar_t kTabIdKey[]; +extern const wchar_t kTargetUrlKey[]; +extern const wchar_t kTimeStampKey[]; +extern const wchar_t kTransitionTypeKey[]; +extern const wchar_t kUrlKey[]; + +// Events. +extern const char kOnBeforeNavigate[]; +extern const char kOnBeforeRetarget[]; +extern const char kOnCommitted[]; +extern const char kOnCompleted[]; +extern const char kOnDOMContentLoaded[]; +extern const char kOnErrorOccurred[]; + +} // namespace extension_web_navigation_api_constants + +#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_NAVIGATION_API_CONSTANTS_H_ diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index debcb6a..68a4704 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -1390,6 +1390,8 @@ 'browser/extensions/extension_toolstrip_api.h', 'browser/extensions/extension_updater.cc', 'browser/extensions/extension_updater.h', + 'browser/extensions/extension_web_navigation_api_constants.cc', + 'browser/extensions/extension_web_navigation_api_constants.h', 'browser/extensions/extensions_quota_service.cc', 'browser/extensions/extensions_quota_service.h', 'browser/extensions/extensions_service.cc', |