OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/glue/webkitclient_impl.h" | 5 #include "webkit/glue/webkitclient_impl.h" |
6 | 6 |
7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include <malloc.h> | 8 #include <malloc.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 base::LinearHistogram::FactoryGet(name, 1, boundary_value, | 279 base::LinearHistogram::FactoryGet(name, 1, boundary_value, |
280 boundary_value + 1, base::Histogram::kUmaTargetedHistogramFlag); | 280 boundary_value + 1, base::Histogram::kUmaTargetedHistogramFlag); |
281 DCHECK_EQ(name, counter->histogram_name()); | 281 DCHECK_EQ(name, counter->histogram_name()); |
282 counter->Add(sample); | 282 counter->Add(sample); |
283 } | 283 } |
284 | 284 |
285 void WebKitClientImpl::traceEventBegin(const char* name, void* id, | 285 void WebKitClientImpl::traceEventBegin(const char* name, void* id, |
286 const char* extra) { | 286 const char* extra) { |
287 TRACE_EVENT_BEGIN(name, id, extra); | 287 TRACE_EVENT_BEGIN(name, id, extra); |
288 GPU_TRACE_EVENT_BEGIN2("webkit", name, | 288 GPU_TRACE_EVENT_BEGIN2("webkit", name, |
289 "id", StringPrintf("%p", id).c_str(), | 289 "id", id, |
290 "extra", extra ? extra : ""); | 290 "extra", extra ? extra : ""); |
291 } | 291 } |
292 | 292 |
293 void WebKitClientImpl::traceEventEnd(const char* name, void* id, | 293 void WebKitClientImpl::traceEventEnd(const char* name, void* id, |
294 const char* extra) { | 294 const char* extra) { |
295 TRACE_EVENT_END(name, id, extra); | 295 TRACE_EVENT_END(name, id, extra); |
296 GPU_TRACE_EVENT_END0("webkit", name); | 296 GPU_TRACE_EVENT_END0("webkit", name); |
297 } | 297 } |
298 | 298 |
299 namespace { | 299 namespace { |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 ++shared_timer_suspended_; | 596 ++shared_timer_suspended_; |
597 } | 597 } |
598 | 598 |
599 void WebKitClientImpl::ResumeSharedTimer() { | 599 void WebKitClientImpl::ResumeSharedTimer() { |
600 // The shared timer may have fired or been adjusted while we were suspended. | 600 // The shared timer may have fired or been adjusted while we were suspended. |
601 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) | 601 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) |
602 setSharedTimerFireTime(shared_timer_fire_time_); | 602 setSharedTimerFireTime(shared_timer_fire_time_); |
603 } | 603 } |
604 | 604 |
605 } // namespace webkit_glue | 605 } // namespace webkit_glue |
OLD | NEW |