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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.h

Issue 2028523002: Attribute Stuff to Frames with FrameBlamer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check existence of BlameContext before using it Created 4 years, 6 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999-2001 Lars Knoll <knoll@kde.org> 3 * 1999-2001 Lars Knoll <knoll@kde.org>
4 * 1999-2001 Antti Koivisto <koivisto@kde.org> 4 * 1999-2001 Antti Koivisto <koivisto@kde.org>
5 * 2000-2001 Simon Hausmann <hausmann@kde.org> 5 * 2000-2001 Simon Hausmann <hausmann@kde.org>
6 * 2000-2001 Dirk Mueller <mueller@kde.org> 6 * 2000-2001 Dirk Mueller <mueller@kde.org>
7 * 2000 Stefan Schimanski <1Stein@gmx.de> 7 * 2000 Stefan Schimanski <1Stein@gmx.de>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 10 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 WTF_MAKE_NONCOPYABLE(FrameNavigationDisabler); 307 WTF_MAKE_NONCOPYABLE(FrameNavigationDisabler);
308 STACK_ALLOCATED(); 308 STACK_ALLOCATED();
309 public: 309 public:
310 explicit FrameNavigationDisabler(LocalFrame&); 310 explicit FrameNavigationDisabler(LocalFrame&);
311 ~FrameNavigationDisabler(); 311 ~FrameNavigationDisabler();
312 312
313 private: 313 private:
314 Member<LocalFrame> m_frame; 314 Member<LocalFrame> m_frame;
315 }; 315 };
316 316
317 // A helper class for attributing cost inside a scope to a LocalFrame, with
318 // output written to the trace log. The class is irrelevant to the core logic
319 // of LocalFrame. Sample usage:
320 //
321 // void foo(LocalFrame* frame)
322 // {
323 // ScopedFrameBlamer frameBlamer(frame);
324 // TRACE_EVENT0("blink", "foo");
325 // // Do some real work...
326 // }
327 //
328 // In Trace Viewer, we can find the cost of slice |foo| attributed to |frame|.
329 // Design doc: https://docs.google.com/document/d/15BB-suCb9j-nFt55yCFJBJCGzLg2q Um3WaSOPb8APtI/edit?usp=sharing
330 class ScopedFrameBlamer {
331 WTF_MAKE_NONCOPYABLE(ScopedFrameBlamer);
332 STACK_ALLOCATED();
333 public:
334 explicit ScopedFrameBlamer(LocalFrame*);
335 ~ScopedFrameBlamer();
336
337 private:
338 Member<LocalFrame> m_frame;
339 };
340
317 } // namespace blink 341 } // namespace blink
318 342
319 #endif // LocalFrame_h 343 #endif // LocalFrame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698