OLD | NEW |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 typedef WillBeHeapVector<RefPtrWillBeMember<MessagePort>, 1> MessagePortArray; | 77 typedef WillBeHeapVector<RefPtrWillBeMember<MessagePort>, 1> MessagePortArray; |
78 | 78 |
79 enum PageshowEventPersistence { | 79 enum PageshowEventPersistence { |
80 PageshowEventNotPersisted = 0, | 80 PageshowEventNotPersisted = 0, |
81 PageshowEventPersisted = 1 | 81 PageshowEventPersisted = 1 |
82 }; | 82 }; |
83 | 83 |
84 enum SetLocationLocking { LockHistoryBasedOnGestureState, LockHistoryAndBackForw
ardList }; | 84 enum SetLocationLocking { LockHistoryBasedOnGestureState, LockHistoryAndBackForw
ardList }; |
85 | 85 |
86 class LocalDOMWindow FINAL : public RefCountedWillBeGarbageCollectedFinalized<Lo
calDOMWindow>, public EventTargetWithInlineData, public DOMWindowBase64, public
FrameDestructionObserver, public WillBeHeapSupplementable<LocalDOMWindow>, publi
c LifecycleContext<LocalDOMWindow> { | 86 class LocalDOMWindow final : public RefCountedWillBeGarbageCollectedFinalized<Lo
calDOMWindow>, public EventTargetWithInlineData, public DOMWindowBase64, public
FrameDestructionObserver, public WillBeHeapSupplementable<LocalDOMWindow>, publi
c LifecycleContext<LocalDOMWindow> { |
87 DEFINE_WRAPPERTYPEINFO(); | 87 DEFINE_WRAPPERTYPEINFO(); |
88 REFCOUNTED_EVENT_TARGET(LocalDOMWindow); | 88 REFCOUNTED_EVENT_TARGET(LocalDOMWindow); |
89 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LocalDOMWindow); | 89 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LocalDOMWindow); |
90 public: | 90 public: |
91 static PassRefPtrWillBeRawPtr<Document> createDocument(const String& mimeTyp
e, const DocumentInit&, bool forceXHTML); | 91 static PassRefPtrWillBeRawPtr<Document> createDocument(const String& mimeTyp
e, const DocumentInit&, bool forceXHTML); |
92 static PassRefPtrWillBeRawPtr<LocalDOMWindow> create(LocalFrame& frame) | 92 static PassRefPtrWillBeRawPtr<LocalDOMWindow> create(LocalFrame& frame) |
93 { | 93 { |
94 return adoptRefWillBeNoop(new LocalDOMWindow(frame)); | 94 return adoptRefWillBeNoop(new LocalDOMWindow(frame)); |
95 } | 95 } |
96 virtual ~LocalDOMWindow(); | 96 virtual ~LocalDOMWindow(); |
97 | 97 |
98 PassRefPtrWillBeRawPtr<Document> installNewDocument(const String& mimeType,
const DocumentInit&, bool forceXHTML = false); | 98 PassRefPtrWillBeRawPtr<Document> installNewDocument(const String& mimeType,
const DocumentInit&, bool forceXHTML = false); |
99 | 99 |
100 virtual const AtomicString& interfaceName() const OVERRIDE; | 100 virtual const AtomicString& interfaceName() const override; |
101 virtual ExecutionContext* executionContext() const OVERRIDE; | 101 virtual ExecutionContext* executionContext() const override; |
102 | 102 |
103 virtual LocalDOMWindow* toDOMWindow() OVERRIDE; | 103 virtual LocalDOMWindow* toDOMWindow() override; |
104 | 104 |
105 void registerProperty(DOMWindowProperty*); | 105 void registerProperty(DOMWindowProperty*); |
106 void unregisterProperty(DOMWindowProperty*); | 106 void unregisterProperty(DOMWindowProperty*); |
107 | 107 |
108 void reset(); | 108 void reset(); |
109 | 109 |
110 PassRefPtrWillBeRawPtr<MediaQueryList> matchMedia(const String&); | 110 PassRefPtrWillBeRawPtr<MediaQueryList> matchMedia(const String&); |
111 | 111 |
112 unsigned pendingUnloadEventListeners() const; | 112 unsigned pendingUnloadEventListeners() const; |
113 | 113 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 // WebKit animation extensions | 238 // WebKit animation extensions |
239 int requestAnimationFrame(RequestAnimationFrameCallback*); | 239 int requestAnimationFrame(RequestAnimationFrameCallback*); |
240 int webkitRequestAnimationFrame(RequestAnimationFrameCallback*); | 240 int webkitRequestAnimationFrame(RequestAnimationFrameCallback*); |
241 void cancelAnimationFrame(int id); | 241 void cancelAnimationFrame(int id); |
242 | 242 |
243 DOMWindowCSS& css() const; | 243 DOMWindowCSS& css() const; |
244 | 244 |
245 // Events | 245 // Events |
246 // EventTarget API | 246 // EventTarget API |
247 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false) OVERRIDE; | 247 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even
tListener>, bool useCapture = false) override; |
248 virtual bool removeEventListener(const AtomicString& eventType, PassRefPtr<E
ventListener>, bool useCapture = false) OVERRIDE; | 248 virtual bool removeEventListener(const AtomicString& eventType, PassRefPtr<E
ventListener>, bool useCapture = false) override; |
249 virtual void removeAllEventListeners() OVERRIDE; | 249 virtual void removeAllEventListeners() override; |
250 | 250 |
251 using EventTarget::dispatchEvent; | 251 using EventTarget::dispatchEvent; |
252 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event> prpEvent, PassRefPtrWillBeR
awPtr<EventTarget> prpTarget); | 252 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event> prpEvent, PassRefPtrWillBeR
awPtr<EventTarget> prpTarget); |
253 | 253 |
254 void dispatchLoadEvent(); | 254 void dispatchLoadEvent(); |
255 | 255 |
256 DEFINE_ATTRIBUTE_EVENT_LISTENER(animationend); | 256 DEFINE_ATTRIBUTE_EVENT_LISTENER(animationend); |
257 DEFINE_ATTRIBUTE_EVENT_LISTENER(animationiteration); | 257 DEFINE_ATTRIBUTE_EVENT_LISTENER(animationiteration); |
258 DEFINE_ATTRIBUTE_EVENT_LISTENER(animationstart); | 258 DEFINE_ATTRIBUTE_EVENT_LISTENER(animationstart); |
259 DEFINE_ATTRIBUTE_EVENT_LISTENER(search); | 259 DEFINE_ATTRIBUTE_EVENT_LISTENER(search); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 void enqueuePopstateEvent(PassRefPtr<SerializedScriptValue>); | 313 void enqueuePopstateEvent(PassRefPtr<SerializedScriptValue>); |
314 void dispatchWindowLoadEvent(); | 314 void dispatchWindowLoadEvent(); |
315 void documentWasClosed(); | 315 void documentWasClosed(); |
316 void statePopped(PassRefPtr<SerializedScriptValue>); | 316 void statePopped(PassRefPtr<SerializedScriptValue>); |
317 | 317 |
318 // FIXME: This shouldn't be public once LocalDOMWindow becomes ExecutionCont
ext. | 318 // FIXME: This shouldn't be public once LocalDOMWindow becomes ExecutionCont
ext. |
319 void clearEventQueue(); | 319 void clearEventQueue(); |
320 | 320 |
321 void acceptLanguagesChanged(); | 321 void acceptLanguagesChanged(); |
322 | 322 |
323 virtual void trace(Visitor*) OVERRIDE; | 323 virtual void trace(Visitor*) override; |
324 | 324 |
325 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext,
v8::Isolate*) OVERRIDE; | 325 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext,
v8::Isolate*) override; |
326 | 326 |
327 protected: | 327 protected: |
328 DOMWindowLifecycleNotifier& lifecycleNotifier(); | 328 DOMWindowLifecycleNotifier& lifecycleNotifier(); |
329 | 329 |
330 private: | 330 private: |
331 explicit LocalDOMWindow(LocalFrame&); | 331 explicit LocalDOMWindow(LocalFrame&); |
332 | 332 |
333 Page* page(); | 333 Page* page(); |
334 | 334 |
335 // FrameDestructionObserver | 335 // FrameDestructionObserver |
336 virtual void willDetachFrameHost() OVERRIDE; | 336 virtual void willDetachFrameHost() override; |
337 | 337 |
338 void clearDocument(); | 338 void clearDocument(); |
339 void willDestroyDocumentInFrame(); | 339 void willDestroyDocumentInFrame(); |
340 | 340 |
341 // FIXME: Oilpan: the need for this internal method will fall | 341 // FIXME: Oilpan: the need for this internal method will fall |
342 // away when EventTargets are no longer using refcounts and | 342 // away when EventTargets are no longer using refcounts and |
343 // window properties are also on the heap. Inline the minimal | 343 // window properties are also on the heap. Inline the minimal |
344 // do-not-broadcast handling then and remove the enum + | 344 // do-not-broadcast handling then and remove the enum + |
345 // removeAllEventListenersInternal(). | 345 // removeAllEventListenersInternal(). |
346 enum BroadcastListenerRemoval { | 346 enum BroadcastListenerRemoval { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 } | 395 } |
396 | 396 |
397 inline String LocalDOMWindow::defaultStatus() const | 397 inline String LocalDOMWindow::defaultStatus() const |
398 { | 398 { |
399 return m_defaultStatus; | 399 return m_defaultStatus; |
400 } | 400 } |
401 | 401 |
402 } // namespace blink | 402 } // namespace blink |
403 | 403 |
404 #endif // LocalDOMWindow_h | 404 #endif // LocalDOMWindow_h |
OLD | NEW |