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

Side by Side Diff: third_party/WebKit/Source/core/frame/History.cpp

Issue 2626423003: Use DOMWindowClient for objects owned by LocalDOMWindow (Closed)
Patch Set: Created 3 years, 11 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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 bool equalIgnoringQueryAndFragment(const KURL& a, const KURL& b) { 52 bool equalIgnoringQueryAndFragment(const KURL& a, const KURL& b) {
53 return StringView(a.getString(), 0, a.pathEnd()) == 53 return StringView(a.getString(), 0, a.pathEnd()) ==
54 StringView(b.getString(), 0, b.pathEnd()); 54 StringView(b.getString(), 0, b.pathEnd());
55 } 55 }
56 56
57 } // namespace 57 } // namespace
58 58
59 History::History(LocalFrame* frame) 59 History::History(LocalFrame* frame)
60 : ContextClient(frame), m_lastStateObjectRequested(nullptr) {} 60 : DOMWindowClient(frame), m_lastStateObjectRequested(nullptr) {}
61 61
62 DEFINE_TRACE(History) { 62 DEFINE_TRACE(History) {
63 ContextClient::trace(visitor); 63 DOMWindowClient::trace(visitor);
64 } 64 }
65 65
66 unsigned History::length() const { 66 unsigned History::length() const {
67 if (!frame() || !frame()->loader().client()) 67 if (!frame() || !frame()->loader().client())
68 return 0; 68 return 0;
69 return frame()->loader().client()->backForwardLength(); 69 return frame()->loader().client()->backForwardLength();
70 } 70 }
71 71
72 SerializedScriptValue* History::state() { 72 SerializedScriptValue* History::state() {
73 m_lastStateObjectRequested = stateInternal(); 73 m_lastStateObjectRequested = stateInternal();
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 frame()->document()->url().elidedString() + "'."); 221 frame()->document()->url().elidedString() + "'.");
222 return; 222 return;
223 } 223 }
224 224
225 frame()->loader().updateForSameDocumentNavigation( 225 frame()->loader().updateForSameDocumentNavigation(
226 fullURL, SameDocumentNavigationHistoryApi, std::move(data), 226 fullURL, SameDocumentNavigationHistoryApi, std::move(data),
227 restorationType, type, frame()->document()); 227 restorationType, type, frame()->document());
228 } 228 }
229 229
230 } // namespace blink 230 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/History.h ('k') | third_party/WebKit/Source/core/frame/Screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698