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

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

Issue 1932653003: Refresh LocalDOMWindow post-Oilpan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: continue using PersistentHeapHashCountedSet<> Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 void clearEventQueue(); 200 void clearEventQueue();
201 201
202 void acceptLanguagesChanged(); 202 void acceptLanguagesChanged();
203 203
204 protected: 204 protected:
205 // EventTarget overrides. 205 // EventTarget overrides.
206 bool addEventListenerInternal(const AtomicString& eventType, EventListener*, const EventListenerOptions&) override; 206 bool addEventListenerInternal(const AtomicString& eventType, EventListener*, const EventListenerOptions&) override;
207 bool removeEventListenerInternal(const AtomicString& eventType, EventListene r*, const EventListenerOptions&) override; 207 bool removeEventListenerInternal(const AtomicString& eventType, EventListene r*, const EventListenerOptions&) override;
208 208
209 private: 209 private:
210 // Rather than simply inheriting LocalFrameLifecycleObserver like most other 210 class WindowFrameObserver;
211 // classes, LocalDOMWindow hides its LocalFrameLifecycleObserver with
212 // composition. This prevents conflicting overloads between DOMWindow, which
213 // has a frame() accessor that returns Frame* for bindings code, and
214 // LocalFrameLifecycleObserver, which has a frame() accessor that returns a
215 // LocalFrame*.
216 class WindowFrameObserver final : public GarbageCollected<WindowFrameObserve r>, public LocalFrameLifecycleObserver {
217 USING_GARBAGE_COLLECTED_MIXIN(WindowFrameObserver);
218 public:
219 static WindowFrameObserver* create(LocalDOMWindow*, LocalFrame&);
220
221 DECLARE_VIRTUAL_TRACE();
222
223 // LocalFrameLifecycleObserver overrides:
224 void willDetachFrameHost() override;
225 void contextDestroyed() override;
226
227 private:
228 WindowFrameObserver(LocalDOMWindow*, LocalFrame&);
229
230 Member<LocalDOMWindow> m_window;
231 };
232 friend WTF::OwnedPtrDeleter<WindowFrameObserver>;
233 211
234 explicit LocalDOMWindow(LocalFrame&); 212 explicit LocalDOMWindow(LocalFrame&);
235 void dispose(); 213 void dispose();
236 214
237 void dispatchLoadEvent(); 215 void dispatchLoadEvent();
238 void clearDocument(); 216 void clearDocument();
239 void willDestroyDocumentInFrame(); 217 void willDestroyDocumentInFrame();
240 218
241 void willDetachFrameHost(); 219 void willDetachFrameHost();
242 void frameDestroyed(); 220 void frameDestroyed();
243 221
244 Member<WindowFrameObserver> m_frameObserver; 222 Member<WindowFrameObserver> m_frameObserver;
245 Member<Document> m_document; 223 Member<Document> m_document;
246 224
247 bool m_shouldPrintWhenFinishedLoading; 225 bool m_shouldPrintWhenFinishedLoading;
248 #if ENABLE(ASSERT)
249 bool m_hasBeenReset;
250 #endif
251 226
252 HeapHashSet<WeakMember<DOMWindowProperty>> m_properties; 227 HeapHashSet<WeakMember<DOMWindowProperty>> m_properties;
253 228
254 mutable Member<Screen> m_screen; 229 mutable Member<Screen> m_screen;
255 mutable Member<History> m_history; 230 mutable Member<History> m_history;
256 mutable Member<BarProp> m_locationbar; 231 mutable Member<BarProp> m_locationbar;
257 mutable Member<BarProp> m_menubar; 232 mutable Member<BarProp> m_menubar;
258 mutable Member<BarProp> m_personalbar; 233 mutable Member<BarProp> m_personalbar;
259 mutable Member<BarProp> m_scrollbars; 234 mutable Member<BarProp> m_scrollbars;
260 mutable Member<BarProp> m_statusbar; 235 mutable Member<BarProp> m_statusbar;
(...skipping 21 matching lines...) Expand all
282 } 257 }
283 258
284 inline String LocalDOMWindow::defaultStatus() const 259 inline String LocalDOMWindow::defaultStatus() const
285 { 260 {
286 return m_defaultStatus; 261 return m_defaultStatus;
287 } 262 }
288 263
289 } // namespace blink 264 } // namespace blink
290 265
291 #endif // LocalDOMWindow_h 266 #endif // LocalDOMWindow_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698