OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 void PerformanceBase::clearResourceTimings() { | 233 void PerformanceBase::clearResourceTimings() { |
234 resource_timing_buffer_.clear(); | 234 resource_timing_buffer_.clear(); |
235 } | 235 } |
236 | 236 |
237 void PerformanceBase::setResourceTimingBufferSize(unsigned size) { | 237 void PerformanceBase::setResourceTimingBufferSize(unsigned size) { |
238 resource_timing_buffer_size_ = size; | 238 resource_timing_buffer_size_ = size; |
239 if (IsResourceTimingBufferFull()) | 239 if (IsResourceTimingBufferFull()) |
240 DispatchEvent(Event::Create(EventTypeNames::resourcetimingbufferfull)); | 240 DispatchEvent(Event::Create(EventTypeNames::resourcetimingbufferfull)); |
241 } | 241 } |
242 | 242 |
243 void PerformanceBase::clearFrameTimings() { | |
244 frame_timing_buffer_.clear(); | |
245 } | |
246 | |
247 void PerformanceBase::setFrameTimingBufferSize(unsigned size) { | |
248 frame_timing_buffer_size_ = size; | |
249 if (IsFrameTimingBufferFull()) | |
250 DispatchEvent(Event::Create(EventTypeNames::frametimingbufferfull)); | |
251 } | |
252 | |
253 bool PerformanceBase::PassesTimingAllowCheck( | 243 bool PerformanceBase::PassesTimingAllowCheck( |
254 const ResourceResponse& response, | 244 const ResourceResponse& response, |
255 const SecurityOrigin& initiator_security_origin, | 245 const SecurityOrigin& initiator_security_origin, |
256 const AtomicString& original_timing_allow_origin, | 246 const AtomicString& original_timing_allow_origin, |
257 ExecutionContext* context) { | 247 ExecutionContext* context) { |
258 RefPtr<SecurityOrigin> resource_origin = | 248 RefPtr<SecurityOrigin> resource_origin = |
259 SecurityOrigin::Create(response.Url()); | 249 SecurityOrigin::Create(response.Url()); |
260 if (resource_origin->IsSameSchemeHostPort(&initiator_security_origin)) | 250 if (resource_origin->IsSameSchemeHostPort(&initiator_security_origin)) |
261 return true; | 251 return true; |
262 | 252 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 visitor->Trace(server_timing_buffer_); | 605 visitor->Trace(server_timing_buffer_); |
616 visitor->Trace(first_paint_timing_); | 606 visitor->Trace(first_paint_timing_); |
617 visitor->Trace(first_contentful_paint_timing_); | 607 visitor->Trace(first_contentful_paint_timing_); |
618 visitor->Trace(observers_); | 608 visitor->Trace(observers_); |
619 visitor->Trace(active_observers_); | 609 visitor->Trace(active_observers_); |
620 visitor->Trace(suspended_observers_); | 610 visitor->Trace(suspended_observers_); |
621 EventTargetWithInlineData::Trace(visitor); | 611 EventTargetWithInlineData::Trace(visitor); |
622 } | 612 } |
623 | 613 |
624 } // namespace blink | 614 } // namespace blink |
OLD | NEW |