| 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 "core/frame/DOMWindow.h" | 5 #include "core/frame/DOMWindow.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/dom/ExceptionCode.h" | 8 #include "core/dom/ExceptionCode.h" |
| 9 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
| 10 #include "core/dom/SecurityContext.h" | 10 #include "core/dom/SecurityContext.h" |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 } | 389 } |
| 390 return; | 390 return; |
| 391 } | 391 } |
| 392 | 392 |
| 393 if (!frame()->shouldClose()) | 393 if (!frame()->shouldClose()) |
| 394 return; | 394 return; |
| 395 | 395 |
| 396 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(context, "close", | 396 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(context, "close", |
| 397 true); | 397 true); |
| 398 | 398 |
| 399 page->chromeClient().closeWindowSoon(); | 399 page->closeSoon(); |
| 400 | 400 |
| 401 // So as to make window.closed return the expected result | 401 // So as to make window.closed return the expected result |
| 402 // after window.close(), separately record the to-be-closed | 402 // after window.close(), separately record the to-be-closed |
| 403 // state of this window. Scripts may access window.closed | 403 // state of this window. Scripts may access window.closed |
| 404 // before the deferred close operation has gone ahead. | 404 // before the deferred close operation has gone ahead. |
| 405 m_windowIsClosing = true; | 405 m_windowIsClosing = true; |
| 406 } | 406 } |
| 407 | 407 |
| 408 void DOMWindow::focus(ExecutionContext* context) { | 408 void DOMWindow::focus(ExecutionContext* context) { |
| 409 if (!frame()) | 409 if (!frame()) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 430 | 430 |
| 431 page->focusController().focusDocumentView(frame(), true /* notifyEmbedder */); | 431 page->focusController().focusDocumentView(frame(), true /* notifyEmbedder */); |
| 432 } | 432 } |
| 433 | 433 |
| 434 DEFINE_TRACE(DOMWindow) { | 434 DEFINE_TRACE(DOMWindow) { |
| 435 visitor->trace(m_location); | 435 visitor->trace(m_location); |
| 436 EventTargetWithInlineData::trace(visitor); | 436 EventTargetWithInlineData::trace(visitor); |
| 437 } | 437 } |
| 438 | 438 |
| 439 } // namespace blink | 439 } // namespace blink |
| OLD | NEW |