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

Unified Diff: content/renderer/render_view_impl.cc

Issue 142143005: Convert the SkiaBenchmarkingExtension to a gin::Wrappable class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 78feab5013be884eba5f44391cb19df9e52dcac2..079c415971c021792ba376393fc441b3c3ea3dd0 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -116,6 +116,7 @@
#include "content/renderer/renderer_webcolorchooser_impl.h"
#include "content/renderer/resizing_mode_selector.h"
#include "content/renderer/savable_resources.h"
+#include "content/renderer/skia_benchmarking_extension.h"
#include "content/renderer/speech_recognition_dispatcher.h"
#include "content/renderer/stats_collection_controller.h"
#include "content/renderer/stats_collection_observer.h"
@@ -3642,11 +3643,18 @@ void RenderViewImpl::didClearWindowObject(WebFrame* frame, int world_id) {
FOR_EACH_OBSERVER(RenderViewObserver, observers_,
DidClearWindowObject(frame, world_id));
- if ((enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION) && (world_id == 0))
- DomAutomationController::Install(this, frame);
+ if (world_id == 0) {
+ if ((enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION))
+ DomAutomationController::Install(this, frame);
- if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION)
- StatsCollectionController::Install(frame);
+ if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION)
+ StatsCollectionController::Install(frame);
+
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+
+ if (command_line.HasSwitch(switches::kEnableSkiaBenchmarking))
+ SkiaBenchmarking::Install(frame);
+ }
}
void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) {

Powered by Google App Engine
This is Rietveld 408576698