diff options
author | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-14 19:22:47 +0000 |
---|---|---|
committer | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-14 19:22:47 +0000 |
commit | 5190d28cbce355d98236bd06beee5099f4da3790 (patch) | |
tree | 6b49752209b3442a75d56dcc1eb668c2526926bd /webkit/glue | |
parent | a02ff58019cc94efe054751468944ccd5b0ab457 (diff) | |
download | chromium_src-5190d28cbce355d98236bd06beee5099f4da3790.zip chromium_src-5190d28cbce355d98236bd06beee5099f4da3790.tar.gz chromium_src-5190d28cbce355d98236bd06beee5099f4da3790.tar.bz2 |
Added stats counters and trace event to ChromiumBridge.
Review URL: http://codereview.chromium.org/10752
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5491 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/chromium_bridge_impl.cc | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/webkit/glue/chromium_bridge_impl.cc b/webkit/glue/chromium_bridge_impl.cc index eece6dd..9ba3624 100644 --- a/webkit/glue/chromium_bridge_impl.cc +++ b/webkit/glue/chromium_bridge_impl.cc @@ -21,7 +21,10 @@ #undef LOG #include "base/clipboard.h" +#include "base/stats_counters.h" #include "base/string_util.h" +#include "base/trace_event.h" +#include <v8.h> #include "webkit/glue/chrome_client_impl.h" #include "webkit/glue/glue_util.h" #include "webkit/glue/scoped_clipboard_writer_glue.h" @@ -290,7 +293,34 @@ IntRect ChromiumBridge::screenAvailableRect(Widget* widget) { webkit_glue::GetScreenInfo(ToPlatform(widget)).available_rect); } -// URL ---------------------------------------------------------------- +// StatsCounters -------------------------------------------------------------- +void ChromiumBridge::decrementStatsCounter(const wchar_t* name) { + StatsCounter(name).Decrement(); +} + +void ChromiumBridge::incrementStatsCounter(const wchar_t* name) { + StatsCounter(name).Increment(); +} + +void ChromiumBridge::initV8CounterFunction() { + v8::V8::SetCounterFunction(StatsTable::FindLocation); +} + +// Trace Event ---------------------------------------------------------------- +void ChromiumBridge::traceEventBegin(const char* name, + void* id, + const char* extra) { + TRACE_EVENT_BEGIN(name, id, extra); +} + +void ChromiumBridge::traceEventEnd(const char* name, + void* id, + const char* extra) { + TRACE_EVENT_END(name, id, extra); +} + + +// URL ------------------------------------------------------------------------ KURL ChromiumBridge::inspectorURL() { return webkit_glue::GURLToKURL(webkit_glue::GetInspectorURL()); } |