summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/pepper_private.cc9
-rw-r--r--webkit/glue/plugins/ppb_private.h3
-rw-r--r--webkit/glue/webkit_glue.h3
-rw-r--r--webkit/support/webkit_support_glue.cc3
-rw-r--r--webkit/tools/test_shell/test_shell.cc3
5 files changed, 20 insertions, 1 deletions
diff --git a/webkit/glue/plugins/pepper_private.cc b/webkit/glue/plugins/pepper_private.cc
index 3cf9248..dd77abd 100644
--- a/webkit/glue/plugins/pepper_private.cc
+++ b/webkit/glue/plugins/pepper_private.cc
@@ -259,6 +259,12 @@ void HistogramPDFPageCount(int count) {
UMA_HISTOGRAM_COUNTS_10000("PDF.PageCount", count);
}
+void UserMetricsRecordAction(PP_Var action) {
+ scoped_refptr<StringVar> action_str(StringVar::FromPPVar(action));
+ if (action_str)
+ webkit_glue::UserMetricsRecordAction(action_str->value());
+}
+
const PPB_Private ppb_private = {
&GetLocalizedString,
&GetResourceImage,
@@ -268,7 +274,8 @@ const PPB_Private ppb_private = {
&DidStartLoading,
&DidStopLoading,
&SetContentRestriction,
- &HistogramPDFPageCount
+ &HistogramPDFPageCount,
+ &UserMetricsRecordAction
};
} // namespace
diff --git a/webkit/glue/plugins/ppb_private.h b/webkit/glue/plugins/ppb_private.h
index 07b32ec..b922bd5d 100644
--- a/webkit/glue/plugins/ppb_private.h
+++ b/webkit/glue/plugins/ppb_private.h
@@ -126,6 +126,9 @@ struct PPB_Private {
// Use UMA so we know average pdf page count.
void (*HistogramPDFPageCount)(int count);
+
+ // Notifies the browser that the given action has been performed.
+ void (*UserMetricsRecordAction)(PP_Var action);
};
#endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h
index 380bf36..b745db4 100644
--- a/webkit/glue/webkit_glue.h
+++ b/webkit/glue/webkit_glue.h
@@ -274,6 +274,9 @@ bool IsSingleProcess();
// Enables/Disables Spdy for requests afterwards. Used for benchmarking.
void EnableSpdy(bool enable);
+// Notifies the browser that the given action has been performed.
+void UserMetricsRecordAction(const std::string& action);
+
#if defined(OS_LINUX)
// Return a read-only file descriptor to the font which best matches the given
// properties or -1 on failure.
diff --git a/webkit/support/webkit_support_glue.cc b/webkit/support/webkit_support_glue.cc
index cc8f4e9..ba2d859 100644
--- a/webkit/support/webkit_support_glue.cc
+++ b/webkit/support/webkit_support_glue.cc
@@ -79,6 +79,9 @@ bool IsSingleProcess() {
void EnableSpdy(bool enable) {
}
+void UserMetricsRecordAction(const std::string& action) {
+}
+
#if defined(OS_LINUX)
int MatchFontWithFallback(const std::string& face, bool bold,
bool italic, int charset) {
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index ee1ad6b..12797fe 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -856,6 +856,9 @@ void EnableSpdy(bool enable) {
// Used in benchmarking, Ignored for test_shell.
}
+void UserMetricsRecordAction(const std::string& action) {
+}
+
std::string GetProductVersion() {
return std::string("Chrome/0.0.0.0");
}