summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/declarative
diff options
context:
space:
mode:
authorlazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-25 17:39:11 +0000
committerlazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-25 17:39:11 +0000
commit1a895fbc4c5a8b5b763593092d93a2bfed4b7417 (patch)
tree60b0bce887796cf9d8bad1c6cef3031636055211 /chrome/browser/extensions/api/declarative
parent38b07d57b9069e3fd44b15bb5883432202ddf78a (diff)
downloadchromium_src-1a895fbc4c5a8b5b763593092d93a2bfed4b7417.zip
chromium_src-1a895fbc4c5a8b5b763593092d93a2bfed4b7417.tar.gz
chromium_src-1a895fbc4c5a8b5b763593092d93a2bfed4b7417.tar.bz2
Rename webview API related files to web_view_internal.
webview.json -> web_view_internal.json NOTRY=True BUG=388380 Test=Internal cleanup, no visible change. Review URL: https://codereview.chromium.org/347143004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/declarative')
-rw-r--r--chrome/browser/extensions/api/declarative/declarative_api.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/chrome/browser/extensions/api/declarative/declarative_api.cc b/chrome/browser/extensions/api/declarative/declarative_api.cc
index f53ead1..9967de4 100644
--- a/chrome/browser/extensions/api/declarative/declarative_api.cc
+++ b/chrome/browser/extensions/api/declarative/declarative_api.cc
@@ -9,6 +9,7 @@
#include "base/task_runner_util.h"
#include "base/values.h"
#include "chrome/browser/extensions/api/declarative/rules_registry_service.h"
+#include "chrome/browser/guest_view/web_view/web_view_constants.h"
#include "chrome/browser/guest_view/web_view/web_view_guest.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/events.h"
@@ -31,20 +32,23 @@ namespace extensions {
namespace {
const char kWebRequest[] = "declarativeWebRequest.";
-const char kWebView[] = "webview.";
const char kWebViewExpectedError[] = "Webview event with Webview ID expected.";
bool IsWebViewEvent(const std::string& event_name) {
// Sample event names:
- // webview.onRequest.
- // webview.OnMessage.
- return event_name.compare(0, strlen(kWebView), kWebView) == 0;
+ // webViewInternal.onRequest.
+ // webViewInternal.onMessage.
+ return event_name.compare(0,
+ strlen(webview::kWebViewEventPrefix),
+ webview::kWebViewEventPrefix) == 0;
}
std::string GetWebRequestEventName(const std::string& event_name) {
std::string web_request_event_name(event_name);
- if (IsWebViewEvent(web_request_event_name))
- web_request_event_name.replace(0, strlen(kWebView), kWebRequest);
+ if (IsWebViewEvent(web_request_event_name)) {
+ web_request_event_name.replace(
+ 0, strlen(webview::kWebViewEventPrefix), kWebRequest);
+ }
return web_request_event_name;
}