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

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: address comments, add more actions 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
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index e422f3c130832ef3d5e657ec8809d8c15d1919cd..f96aba9fc68dcfc289845b9aab66ea416b4fff9a 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"
@@ -640,6 +641,10 @@ RenderWidget* RenderFrameImpl::GetRenderWidget() {
void RenderFrameImpl::PepperPluginCreated(RendererPpapiHost* host) {
FOR_EACH_OBSERVER(RenderFrameObserver, observers_,
DidCreatePepperPlugin(host));
+ if (host->GetPluginName() == kFlashPluginName) {
+ RenderThread::Get()->RecordAction(
+ base::UserMetricsAction("FrameLoadWithFlash"));
+ }
}
void RenderFrameImpl::PepperDidChangeCursor(
@@ -1645,7 +1650,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)));
@@ -2593,9 +2598,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;

Powered by Google App Engine
This is Rietveld 408576698