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

Side by Side Diff: Source/core/timing/Performance.cpp

Issue 106353005: Expose performance.memory in workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@Perf-Memory-SharedWorker
Patch Set: Created 6 years, 9 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 unified diff | Download patch
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 ExecutionContext* Performance::executionContext() const 70 ExecutionContext* Performance::executionContext() const
71 { 71 {
72 if (!frame()) 72 if (!frame())
73 return 0; 73 return 0;
74 return frame()->document(); 74 return frame()->document();
75 } 75 }
76 76
77 PassRefPtrWillBeRawPtr<MemoryInfo> Performance::memory() const 77 PassRefPtrWillBeRawPtr<MemoryInfo> Performance::memory() const
78 { 78 {
79 return MemoryInfo::create(m_frame); 79 return MemoryInfo::create();
80 } 80 }
81 81
82 PerformanceNavigation* Performance::navigation() const 82 PerformanceNavigation* Performance::navigation() const
83 { 83 {
84 if (!m_navigation) 84 if (!m_navigation)
85 m_navigation = PerformanceNavigation::create(m_frame); 85 m_navigation = PerformanceNavigation::create(m_frame);
86 86
87 return m_navigation.get(); 87 return m_navigation.get();
88 } 88 }
89 89
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 void Performance::trace(Visitor* visitor) 282 void Performance::trace(Visitor* visitor)
283 { 283 {
284 visitor->trace(m_navigation); 284 visitor->trace(m_navigation);
285 visitor->trace(m_timing); 285 visitor->trace(m_timing);
286 visitor->trace(m_resourceTimingBuffer); 286 visitor->trace(m_resourceTimingBuffer);
287 visitor->trace(m_userTiming); 287 visitor->trace(m_userTiming);
288 } 288 }
289 289
290 } // namespace WebCore 290 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698