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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2811793005: Rename LocalFrame::Script() to GetScriptController() (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 } 356 }
357 357
358 DEFINE_TRACE(LocalFrame) { 358 DEFINE_TRACE(LocalFrame) {
359 visitor->Trace(instrumenting_agents_); 359 visitor->Trace(instrumenting_agents_);
360 visitor->Trace(performance_monitor_); 360 visitor->Trace(performance_monitor_);
361 visitor->Trace(loader_); 361 visitor->Trace(loader_);
362 visitor->Trace(navigation_scheduler_); 362 visitor->Trace(navigation_scheduler_);
363 visitor->Trace(view_); 363 visitor->Trace(view_);
364 visitor->Trace(dom_window_); 364 visitor->Trace(dom_window_);
365 visitor->Trace(page_popup_owner_); 365 visitor->Trace(page_popup_owner_);
366 visitor->Trace(script_); 366 visitor->Trace(script_controller_);
367 visitor->Trace(editor_); 367 visitor->Trace(editor_);
368 visitor->Trace(spell_checker_); 368 visitor->Trace(spell_checker_);
369 visitor->Trace(selection_); 369 visitor->Trace(selection_);
370 visitor->Trace(event_handler_); 370 visitor->Trace(event_handler_);
371 visitor->Trace(console_); 371 visitor->Trace(console_);
372 visitor->Trace(input_method_controller_); 372 visitor->Trace(input_method_controller_);
373 Frame::Trace(visitor); 373 Frame::Trace(visitor);
374 Supplementable<LocalFrame>::Trace(visitor); 374 Supplementable<LocalFrame>::Trace(visitor);
375 } 375 }
376 376
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 // - FrameLoader::detach() can fire XHR abort events 436 // - FrameLoader::detach() can fire XHR abort events
437 // - Document::shutdown()'s deferred widget updates can run script. 437 // - Document::shutdown()'s deferred widget updates can run script.
438 ScriptForbiddenScope forbid_script; 438 ScriptForbiddenScope forbid_script;
439 loader_.Clear(); 439 loader_.Clear();
440 if (!Client()) 440 if (!Client())
441 return; 441 return;
442 442
443 Client()->WillBeDetached(); 443 Client()->WillBeDetached();
444 // Notify ScriptController that the frame is closing, since its cleanup ends 444 // Notify ScriptController that the frame is closing, since its cleanup ends
445 // up calling back to LocalFrameClient via WindowProxy. 445 // up calling back to LocalFrameClient via WindowProxy.
446 Script().ClearForClose(); 446 GetScriptController().ClearForClose();
447 SetView(nullptr); 447 SetView(nullptr);
448 448
449 page_->GetEventHandlerRegistry().DidRemoveAllEventHandlers(*DomWindow()); 449 page_->GetEventHandlerRegistry().DidRemoveAllEventHandlers(*DomWindow());
450 450
451 DomWindow()->FrameDestroyed(); 451 DomWindow()->FrameDestroyed();
452 452
453 // TODO: Page should take care of updating focus/scrolling instead of Frame. 453 // TODO: Page should take care of updating focus/scrolling instead of Frame.
454 // TODO: It's unclear as to why this is called more than once, but it is, 454 // TODO: It's unclear as to why this is called more than once, but it is,
455 // so page() could be null. 455 // so page() could be null.
456 if (GetPage() && GetPage()->GetFocusController().FocusedFrame() == this) 456 if (GetPage() && GetPage()->GetFocusController().FocusedFrame() == this)
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 LocalWindowProxy* LocalFrame::WindowProxy(DOMWrapperWorld& world) { 530 LocalWindowProxy* LocalFrame::WindowProxy(DOMWrapperWorld& world) {
531 return ToLocalWindowProxy(Frame::GetWindowProxy(world)); 531 return ToLocalWindowProxy(Frame::GetWindowProxy(world));
532 } 532 }
533 533
534 LocalDOMWindow* LocalFrame::DomWindow() const { 534 LocalDOMWindow* LocalFrame::DomWindow() const {
535 return ToLocalDOMWindow(dom_window_); 535 return ToLocalDOMWindow(dom_window_);
536 } 536 }
537 537
538 void LocalFrame::SetDOMWindow(LocalDOMWindow* dom_window) { 538 void LocalFrame::SetDOMWindow(LocalDOMWindow* dom_window) {
539 if (dom_window) 539 if (dom_window)
540 Script().ClearWindowProxy(); 540 GetScriptController().ClearWindowProxy();
541 541
542 if (this->DomWindow()) 542 if (this->DomWindow())
543 this->DomWindow()->Reset(); 543 this->DomWindow()->Reset();
544 dom_window_ = dom_window; 544 dom_window_ = dom_window;
545 } 545 }
546 546
547 Document* LocalFrame::GetDocument() const { 547 Document* LocalFrame::GetDocument() const {
548 return DomWindow() ? DomWindow()->document() : nullptr; 548 return DomWindow() ? DomWindow()->document() : nullptr;
549 } 549 }
550 550
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 inline LocalFrame::LocalFrame(LocalFrameClient* client, 875 inline LocalFrame::LocalFrame(LocalFrameClient* client,
876 Page& page, 876 Page& page,
877 FrameOwner* owner, 877 FrameOwner* owner,
878 InterfaceProvider* interface_provider, 878 InterfaceProvider* interface_provider,
879 InterfaceRegistry* interface_registry) 879 InterfaceRegistry* interface_registry)
880 : Frame(client, page, owner, LocalWindowProxyManager::Create(*this)), 880 : Frame(client, page, owner, LocalWindowProxyManager::Create(*this)),
881 frame_scheduler_(page.GetChromeClient().CreateFrameScheduler( 881 frame_scheduler_(page.GetChromeClient().CreateFrameScheduler(
882 client->GetFrameBlameContext())), 882 client->GetFrameBlameContext())),
883 loader_(this), 883 loader_(this),
884 navigation_scheduler_(NavigationScheduler::Create(this)), 884 navigation_scheduler_(NavigationScheduler::Create(this)),
885 script_(ScriptController::Create( 885 script_controller_(ScriptController::Create(
886 *this, 886 *this,
887 *static_cast<LocalWindowProxyManager*>(GetWindowProxyManager()))), 887 *static_cast<LocalWindowProxyManager*>(GetWindowProxyManager()))),
888 editor_(Editor::Create(*this)), 888 editor_(Editor::Create(*this)),
889 spell_checker_(SpellChecker::Create(*this)), 889 spell_checker_(SpellChecker::Create(*this)),
890 selection_(FrameSelection::Create(*this)), 890 selection_(FrameSelection::Create(*this)),
891 event_handler_(new EventHandler(*this)), 891 event_handler_(new EventHandler(*this)),
892 console_(FrameConsole::Create(*this)), 892 console_(FrameConsole::Create(*this)),
893 input_method_controller_(InputMethodController::Create(*this)), 893 input_method_controller_(InputMethodController::Create(*this)),
894 navigation_disable_count_(0), 894 navigation_disable_count_(0),
895 page_zoom_factor_(ParentPageZoomFactor(this)), 895 page_zoom_factor_(ParentPageZoomFactor(this)),
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 if (frame_ && frame_->Client() && frame_->Client()->GetFrameBlameContext()) 946 if (frame_ && frame_->Client() && frame_->Client()->GetFrameBlameContext())
947 frame_->Client()->GetFrameBlameContext()->Enter(); 947 frame_->Client()->GetFrameBlameContext()->Enter();
948 } 948 }
949 949
950 ScopedFrameBlamer::~ScopedFrameBlamer() { 950 ScopedFrameBlamer::~ScopedFrameBlamer() {
951 if (frame_ && frame_->Client() && frame_->Client()->GetFrameBlameContext()) 951 if (frame_ && frame_->Client() && frame_->Client()->GetFrameBlameContext())
952 frame_->Client()->GetFrameBlameContext()->Leave(); 952 frame_->Client()->GetFrameBlameContext()->Leave();
953 } 953 }
954 954
955 } // namespace blink 955 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698