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

Side by Side Diff: Source/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp

Issue 44453002: Remove HistogramSupport abstraction layer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/V8WindowShell.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. 2 * Copyright (C) 2007-2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "V8InspectorFrontendHost.h" 32 #include "V8InspectorFrontendHost.h"
33 33
34 #include "V8MouseEvent.h" 34 #include "V8MouseEvent.h"
35 #include "bindings/v8/V8Binding.h" 35 #include "bindings/v8/V8Binding.h"
36 #include "core/inspector/InspectorController.h" 36 #include "core/inspector/InspectorController.h"
37 #include "core/inspector/InspectorFrontendClient.h" 37 #include "core/inspector/InspectorFrontendClient.h"
38 #include "core/inspector/InspectorFrontendHost.h" 38 #include "core/inspector/InspectorFrontendHost.h"
39 #include "core/platform/HistogramSupport.h" 39 #include "public/platform/Platform.h"
40 #include "wtf/text/WTFString.h" 40 #include "wtf/text/WTFString.h"
41 41
42 namespace WebCore { 42 namespace WebCore {
43 43
44 void V8InspectorFrontendHost::platformMethodCustom(const v8::FunctionCallbackInf o<v8::Value>& args) 44 void V8InspectorFrontendHost::platformMethodCustom(const v8::FunctionCallbackInf o<v8::Value>& args)
45 { 45 {
46 #if OS(MACOSX) 46 #if OS(MACOSX)
47 v8SetReturnValue(args, v8::String::NewSymbol("mac")); 47 v8SetReturnValue(args, v8::String::NewSymbol("mac"));
48 #elif OS(WIN) 48 #elif OS(WIN)
49 v8SetReturnValue(args, v8::String::NewSymbol("windows")); 49 v8SetReturnValue(args, v8::String::NewSymbol("windows"));
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 frontendHost->showContextMenu(event, items); 117 frontendHost->showContextMenu(event, items);
118 } 118 }
119 119
120 static void histogramEnumeration(const char* name, const v8::FunctionCallbackInf o<v8::Value>& args, int boundaryValue) 120 static void histogramEnumeration(const char* name, const v8::FunctionCallbackInf o<v8::Value>& args, int boundaryValue)
121 { 121 {
122 if (args.Length() < 1 || !args[0]->IsInt32()) 122 if (args.Length() < 1 || !args[0]->IsInt32())
123 return; 123 return;
124 124
125 int sample = args[0]->ToInt32()->Value(); 125 int sample = args[0]->ToInt32()->Value();
126 if (sample < boundaryValue) 126 if (sample < boundaryValue)
127 HistogramSupport::histogramEnumeration(name, sample, boundaryValue); 127 WebKit::Platform::current()->histogramEnumeration(name, sample, boundary Value);
128 } 128 }
129 129
130 void V8InspectorFrontendHost::recordActionTakenMethodCustom(const v8::FunctionCa llbackInfo<v8::Value>& args) 130 void V8InspectorFrontendHost::recordActionTakenMethodCustom(const v8::FunctionCa llbackInfo<v8::Value>& args)
131 { 131 {
132 histogramEnumeration("DevTools.ActionTaken", args, 100); 132 histogramEnumeration("DevTools.ActionTaken", args, 100);
133 } 133 }
134 134
135 void V8InspectorFrontendHost::recordPanelShownMethodCustom(const v8::FunctionCal lbackInfo<v8::Value>& args) 135 void V8InspectorFrontendHost::recordPanelShownMethodCustom(const v8::FunctionCal lbackInfo<v8::Value>& args)
136 { 136 {
137 histogramEnumeration("DevTools.PanelShown", args, 20); 137 histogramEnumeration("DevTools.PanelShown", args, 20);
138 } 138 }
139 139
140 void V8InspectorFrontendHost::recordSettingChangedMethodCustom(const v8::Functio nCallbackInfo<v8::Value>& args) 140 void V8InspectorFrontendHost::recordSettingChangedMethodCustom(const v8::Functio nCallbackInfo<v8::Value>& args)
141 { 141 {
142 histogramEnumeration("DevTools.SettingChanged", args, 100); 142 histogramEnumeration("DevTools.SettingChanged", args, 100);
143 } 143 }
144 144
145 } // namespace WebCore 145 } // namespace WebCore
146 146
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8WindowShell.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698