| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 | 726 |
| 727 frame()->document()->addConsoleMessage(ConsoleMessage::create( | 727 frame()->document()->addConsoleMessage(ConsoleMessage::create( |
| 728 OtherMessageSource, webCoreMessageLevel, message.text, | 728 OtherMessageSource, webCoreMessageLevel, message.text, |
| 729 SourceLocation::create(message.url, message.lineNumber, | 729 SourceLocation::create(message.url, message.lineNumber, |
| 730 message.columnNumber, nullptr))); | 730 message.columnNumber, nullptr))); |
| 731 } | 731 } |
| 732 | 732 |
| 733 void WebLocalFrameImpl::collectGarbage() { | 733 void WebLocalFrameImpl::collectGarbage() { |
| 734 if (!frame()) | 734 if (!frame()) |
| 735 return; | 735 return; |
| 736 if (!frame()->settings()->scriptEnabled()) | 736 if (!frame()->settings()->getScriptEnabled()) |
| 737 return; | 737 return; |
| 738 V8GCController::collectGarbage(v8::Isolate::GetCurrent()); | 738 V8GCController::collectGarbage(v8::Isolate::GetCurrent()); |
| 739 } | 739 } |
| 740 | 740 |
| 741 v8::Local<v8::Value> WebLocalFrameImpl::executeScriptAndReturnValue( | 741 v8::Local<v8::Value> WebLocalFrameImpl::executeScriptAndReturnValue( |
| 742 const WebScriptSource& source) { | 742 const WebScriptSource& source) { |
| 743 DCHECK(frame()); | 743 DCHECK(frame()); |
| 744 | 744 |
| 745 TextPosition position(OrdinalNumber::fromOneBasedInt(source.startLine), | 745 TextPosition position(OrdinalNumber::fromOneBasedInt(source.startLine), |
| 746 OrdinalNumber::first()); | 746 OrdinalNumber::first()); |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1555 client() ? client()->interfaceProvider() : nullptr, | 1555 client() ? client()->interfaceProvider() : nullptr, |
| 1556 client() ? client()->interfaceRegistry() : nullptr)); | 1556 client() ? client()->interfaceRegistry() : nullptr)); |
| 1557 frame()->tree().setPrecalculatedName(name, uniqueName); | 1557 frame()->tree().setPrecalculatedName(name, uniqueName); |
| 1558 // We must call init() after m_frame is assigned because it is referenced | 1558 // We must call init() after m_frame is assigned because it is referenced |
| 1559 // during init(). Note that this may dispatch JS events; the frame may be | 1559 // during init(). Note that this may dispatch JS events; the frame may be |
| 1560 // detached after init() returns. | 1560 // detached after init() returns. |
| 1561 frame()->init(); | 1561 frame()->init(); |
| 1562 if (frame()) { | 1562 if (frame()) { |
| 1563 if (frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() && | 1563 if (frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() && |
| 1564 !parent() && !opener() && | 1564 !parent() && !opener() && |
| 1565 frame()->settings()->shouldReuseGlobalForUnownedMainFrame()) { | 1565 frame()->settings()->getShouldReuseGlobalForUnownedMainFrame()) { |
| 1566 frame()->document()->getSecurityOrigin()->grantUniversalAccess(); | 1566 frame()->document()->getSecurityOrigin()->grantUniversalAccess(); |
| 1567 } | 1567 } |
| 1568 | 1568 |
| 1569 // TODO(dominickn): This interface should be document-scoped rather than | 1569 // TODO(dominickn): This interface should be document-scoped rather than |
| 1570 // frame-scoped, as the resulting banner event is dispatched to | 1570 // frame-scoped, as the resulting banner event is dispatched to |
| 1571 // frame()->document(). | 1571 // frame()->document(). |
| 1572 frame()->interfaceRegistry()->addInterface(WTF::bind( | 1572 frame()->interfaceRegistry()->addInterface(WTF::bind( |
| 1573 &AppBannerController::bindMojoRequest, wrapWeakPersistent(frame()))); | 1573 &AppBannerController::bindMojoRequest, wrapWeakPersistent(frame()))); |
| 1574 | 1574 |
| 1575 frame()->interfaceRegistry()->addInterface(WTF::bind( | 1575 frame()->interfaceRegistry()->addInterface(WTF::bind( |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2361 ->frameScheduler() | 2361 ->frameScheduler() |
| 2362 ->unthrottledTaskRunner() | 2362 ->unthrottledTaskRunner() |
| 2363 ->toSingleThreadTaskRunner(); | 2363 ->toSingleThreadTaskRunner(); |
| 2364 } | 2364 } |
| 2365 | 2365 |
| 2366 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { | 2366 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const { |
| 2367 return m_inputMethodController.get(); | 2367 return m_inputMethodController.get(); |
| 2368 } | 2368 } |
| 2369 | 2369 |
| 2370 } // namespace blink | 2370 } // namespace blink |
| OLD | NEW |