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

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, 7 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 ExecutionContext* Performance::executionContext() const 66 ExecutionContext* Performance::executionContext() const
67 { 67 {
68 if (!frame()) 68 if (!frame())
69 return 0; 69 return 0;
70 return frame()->document(); 70 return frame()->document();
71 } 71 }
72 72
73 PassRefPtrWillBeRawPtr<MemoryInfo> Performance::memory() const 73 PassRefPtrWillBeRawPtr<MemoryInfo> Performance::memory() const
74 { 74 {
75 return MemoryInfo::create(m_frame); 75 return MemoryInfo::create();
76 } 76 }
77 77
78 PerformanceNavigation* Performance::navigation() const 78 PerformanceNavigation* Performance::navigation() const
79 { 79 {
80 if (!m_navigation) 80 if (!m_navigation)
81 m_navigation = PerformanceNavigation::create(m_frame); 81 m_navigation = PerformanceNavigation::create(m_frame);
82 82
83 return m_navigation.get(); 83 return m_navigation.get();
84 } 84 }
85 85
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 void Performance::trace(Visitor* visitor) 278 void Performance::trace(Visitor* visitor)
279 { 279 {
280 visitor->trace(m_navigation); 280 visitor->trace(m_navigation);
281 visitor->trace(m_timing); 281 visitor->trace(m_timing);
282 visitor->trace(m_resourceTimingBuffer); 282 visitor->trace(m_resourceTimingBuffer);
283 visitor->trace(m_userTiming); 283 visitor->trace(m_userTiming);
284 } 284 }
285 285
286 } // namespace WebCore 286 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698