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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceNavigation.cpp

Issue 2509143002: Add Prerender type to NavigationType for nav timing 2 (Closed)
Patch Set: synced client Created 4 years 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 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #include "core/timing/PerformanceNavigation.h" 31 #include "core/timing/PerformanceNavigation.h"
32 32
33 #include "bindings/core/v8/ScriptValue.h" 33 #include "bindings/core/v8/ScriptValue.h"
34 #include "bindings/core/v8/V8ObjectBuilder.h" 34 #include "bindings/core/v8/V8ObjectBuilder.h"
35 #include "core/frame/LocalFrame.h" 35 #include "core/frame/LocalFrame.h"
36 #include "core/loader/DocumentLoader.h" 36 #include "core/loader/DocumentLoader.h"
37 #include "core/loader/FrameLoaderTypes.h" 37 #include "core/loader/FrameLoaderTypes.h"
38 38
39 // Legacy support for NT1(https://www.w3.org/TR/navigation-timing/).
39 namespace blink { 40 namespace blink {
40 41
41 PerformanceNavigation::PerformanceNavigation(LocalFrame* frame) 42 PerformanceNavigation::PerformanceNavigation(LocalFrame* frame)
42 : DOMWindowProperty(frame) {} 43 : DOMWindowProperty(frame) {}
43 44
44 unsigned short PerformanceNavigation::type() const { 45 unsigned short PerformanceNavigation::type() const {
45 if (!frame()) 46 if (!frame())
46 return kTypeNavigate; 47 return kTypeNavigate;
47 48
48 DocumentLoader* documentLoader = frame()->loader().documentLoader(); 49 DocumentLoader* documentLoader = frame()->loader().documentLoader();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 result.addNumber("type", type()); 81 result.addNumber("type", type());
81 result.addNumber("redirectCount", redirectCount()); 82 result.addNumber("redirectCount", redirectCount());
82 return result.scriptValue(); 83 return result.scriptValue();
83 } 84 }
84 85
85 DEFINE_TRACE(PerformanceNavigation) { 86 DEFINE_TRACE(PerformanceNavigation) {
86 DOMWindowProperty::trace(visitor); 87 DOMWindowProperty::trace(visitor);
87 } 88 }
88 89
89 } // namespace blink 90 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698