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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2702273004: bindings: Simplifies WindowProxyManager and its relation to Frame. (Closed)
Patch Set: Did changes in order to keep the exactly same behavior. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 6fa75cf9bc647ce1230b616b021a0adf8eee7440..59ff05e32fabfd225a61ec2d4fd60bfc4f357d71 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -361,10 +361,6 @@ DEFINE_TRACE(LocalFrame) {
Supplementable<LocalFrame>::trace(visitor);
}
-WindowProxy* LocalFrame::windowProxy(DOMWrapperWorld& world) {
- return m_script->windowProxy(world);
-}
-
void LocalFrame::navigate(Document& originDocument,
const KURL& url,
bool replaceCurrentItem,
@@ -493,10 +489,6 @@ void LocalFrame::printNavigationWarning(const String& message) {
ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message));
}
-WindowProxyManagerBase* LocalFrame::getWindowProxyManager() const {
- return m_script->getWindowProxyManager();
-}
-
bool LocalFrame::shouldClose() {
// TODO(dcheng): This should be fixed to dispatch beforeunload events to
// both local and remote frames.
@@ -853,12 +845,14 @@ inline LocalFrame::LocalFrame(LocalFrameClient* client,
FrameOwner* owner,
InterfaceProvider* interfaceProvider,
InterfaceRegistry* interfaceRegistry)
- : Frame(client, host, owner),
+ : Frame(client, host, owner, LocalWindowProxyManager::create(*this)),
m_frameScheduler(page()->chromeClient().createFrameScheduler(
client->frameBlameContext())),
m_loader(this),
m_navigationScheduler(NavigationScheduler::create(this)),
- m_script(ScriptController::create(this)),
+ m_script(ScriptController::create(
+ this,
+ static_cast<LocalWindowProxyManager*>(getWindowProxyManager()))),
haraken 2017/03/10 12:44:12 Hmm, it looks a bit redundant that LocalFrame has
Yuki 2017/03/10 15:21:51 ScriptController::ScriptController(LocalFrame& fra
haraken 2017/03/11 19:35:25 It's fine that ScriptController has m_windowProxyM
m_editor(Editor::create(*this)),
m_spellChecker(SpellChecker::create(*this)),
m_selection(FrameSelection::create(*this)),

Powered by Google App Engine
This is Rietveld 408576698