Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: content/renderer/render_frame_impl.cc

Issue 687273004: Measure the number of frame loads with Flash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: omit content:: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index e383c3fb31e6786bfcf02c00b74513d7d8eab17d..e1e13683623aa942b5008f6d85c26c7f102e84c2 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -52,6 +52,7 @@
#include "content/public/renderer/document_state.h"
#include "content/public/renderer/navigation_state.h"
#include "content/public/renderer/render_frame_observer.h"
+#include "content/public/renderer/renderer_ppapi_host.h"
#include "content/renderer/accessibility/renderer_accessibility_complete.h"
#include "content/renderer/browser_plugin/browser_plugin.h"
#include "content/renderer/browser_plugin/browser_plugin_manager.h"
@@ -639,6 +640,8 @@ RenderWidget* RenderFrameImpl::GetRenderWidget() {
void RenderFrameImpl::PepperPluginCreated(RendererPpapiHost* host) {
FOR_EACH_OBSERVER(RenderFrameObserver, observers_,
DidCreatePepperPlugin(host));
+ if (host->GetPluginName() == kFlashPluginName)
+ RecordAction(base::UserMetricsAction("PageLoadWithFlash"));
Charlie Reis 2014/10/30 18:46:26 Can this be called more than once per page load?
Lei Zhang 2014/10/30 22:14:40 The plugin is only created once here, and each Fla
Charlie Reis 2014/10/30 22:25:39 Cool. Seems like it could happen in multiple Rend
dmichael (off chromium) 2014/10/30 22:54:10 Right, it looks like it's 1 per-RenderFrame-per-pl
}
void RenderFrameImpl::PepperDidChangeCursor(
@@ -1634,7 +1637,7 @@ blink::WebPlugin* RenderFrameImpl::createPlugin(
if (!found)
return NULL;
- if (info.type == content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN) {
+ if (info.type == WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN) {
scoped_ptr<BrowserPluginDelegate> browser_plugin_delegate(
GetContentClient()->renderer()->CreateBrowserPluginDelegate(
this, base::UTF16ToUTF8(params.mimeType)));
@@ -2582,9 +2585,9 @@ blink::WebColorChooser* RenderFrameImpl::createColorChooser(
const blink::WebVector<blink::WebColorSuggestion>& suggestions) {
RendererWebColorChooserImpl* color_chooser =
new RendererWebColorChooserImpl(this, client);
- std::vector<content::ColorSuggestion> color_suggestions;
+ std::vector<ColorSuggestion> color_suggestions;
for (size_t i = 0; i < suggestions.size(); i++) {
- color_suggestions.push_back(content::ColorSuggestion(suggestions[i]));
+ color_suggestions.push_back(ColorSuggestion(suggestions[i]));
}
color_chooser->Open(static_cast<SkColor>(initial_color), color_suggestions);
return color_chooser;
« no previous file with comments | « no previous file | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698