OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/frame/DOMWindow.h" | 6 #include "core/frame/DOMWindow.h" |
7 | 7 |
8 #include "bindings/core/v8/ScriptCallStackFactory.h" | 8 #include "bindings/core/v8/ScriptCallStackFactory.h" |
9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
10 #include "core/dom/ExceptionCode.h" | 10 #include "core/dom/ExceptionCode.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 DOMWindow::DOMWindow() | 26 DOMWindow::DOMWindow() |
27 : m_windowIsClosing(false) | 27 : m_windowIsClosing(false) |
28 { | 28 { |
29 } | 29 } |
30 | 30 |
31 DOMWindow::~DOMWindow() | 31 DOMWindow::~DOMWindow() |
32 { | 32 { |
33 } | 33 } |
34 | 34 |
35 v8::Handle<v8::Object> DOMWindow::wrap(v8::Handle<v8::Object> creationContext, v
8::Isolate*) | |
36 { | |
37 // DOMWindow must never be wrapped with wrap method. The wrappers must be | |
38 // created at WindowProxy::installDOMWindow(). | |
39 RELEASE_ASSERT_NOT_REACHED(); | |
40 return v8::Handle<v8::Object>(); | |
41 } | |
42 | |
43 v8::Handle<v8::Object> DOMWindow::associateWithWrapper(v8::Isolate*, const Wrapp
erTypeInfo*, v8::Handle<v8::Object> wrapper) | |
44 { | |
45 RELEASE_ASSERT_NOT_REACHED(); // same as wrap method | |
46 return v8::Handle<v8::Object>(); | |
47 } | |
48 | |
49 const AtomicString& DOMWindow::interfaceName() const | |
50 { | |
51 return EventTargetNames::DOMWindow; | |
52 } | |
53 | |
54 Location* DOMWindow::location() const | 35 Location* DOMWindow::location() const |
55 { | 36 { |
56 if (!m_location) | 37 if (!m_location) |
57 m_location = Location::create(frame()); | 38 m_location = Location::create(frame()); |
58 return m_location.get(); | 39 return m_location.get(); |
59 } | 40 } |
60 | 41 |
61 bool DOMWindow::closed() const | 42 bool DOMWindow::closed() const |
62 { | 43 { |
63 return m_windowIsClosing || !frame() || !frame()->host(); | 44 return m_windowIsClosing || !frame() || !frame()->host(); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 } | 185 } |
205 } | 186 } |
206 | 187 |
207 DEFINE_TRACE(DOMWindow) | 188 DEFINE_TRACE(DOMWindow) |
208 { | 189 { |
209 visitor->trace(m_location); | 190 visitor->trace(m_location); |
210 EventTargetWithInlineData::trace(visitor); | 191 EventTargetWithInlineData::trace(visitor); |
211 } | 192 } |
212 | 193 |
213 } // namespace blink | 194 } // namespace blink |
OLD | NEW |