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

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

Issue 1532413002: Added Dartium changes onto 45.0.2454.104 (Closed) Base URL: http://src.chromium.org/blink/branches/chromium/2454
Patch Set: Created 5 years 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
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/frame/NavigatorID.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 12 matching lines...) Expand all
23 * 23 *
24 * You should have received a copy of the GNU Library General Public License 24 * You should have received a copy of the GNU Library General Public License
25 * along with this library; see the file COPYING.LIB. If not, write to 25 * along with this library; see the file COPYING.LIB. If not, write to
26 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 26 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
27 * Boston, MA 02110-1301, USA. 27 * Boston, MA 02110-1301, USA.
28 */ 28 */
29 29
30 #include "config.h" 30 #include "config.h"
31 #include "core/frame/LocalFrame.h" 31 #include "core/frame/LocalFrame.h"
32 32
33 #include "bindings/core/dart/DartController.h"
33 #include "bindings/core/v8/ScriptController.h" 34 #include "bindings/core/v8/ScriptController.h"
34 #include "core/dom/DocumentType.h" 35 #include "core/dom/DocumentType.h"
35 #include "core/editing/Editor.h" 36 #include "core/editing/Editor.h"
36 #include "core/editing/FrameSelection.h" 37 #include "core/editing/FrameSelection.h"
37 #include "core/editing/InputMethodController.h" 38 #include "core/editing/InputMethodController.h"
38 #include "core/editing/SpellChecker.h" 39 #include "core/editing/SpellChecker.h"
39 #include "core/editing/htmlediting.h" 40 #include "core/editing/htmlediting.h"
40 #include "core/editing/markup.h" 41 #include "core/editing/markup.h"
41 #include "core/events/Event.h" 42 #include "core/events/Event.h"
42 #include "core/fetch/ResourceFetcher.h" 43 #include "core/fetch/ResourceFetcher.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 void LocalFrame::willDetachFrameHost() 360 void LocalFrame::willDetachFrameHost()
360 { 361 {
361 LocalFrameLifecycleNotifier::notifyWillDetachFrameHost(); 362 LocalFrameLifecycleNotifier::notifyWillDetachFrameHost();
362 363
363 // FIXME: Page should take care of updating focus/scrolling instead of Frame . 364 // FIXME: Page should take care of updating focus/scrolling instead of Frame .
364 // FIXME: It's unclear as to why this is called more than once, but it is, 365 // FIXME: It's unclear as to why this is called more than once, but it is,
365 // so page() could be null. 366 // so page() could be null.
366 if (page() && page()->focusController().focusedFrame() == this) 367 if (page() && page()->focusController().focusedFrame() == this)
367 page()->focusController().setFocusedFrame(nullptr); 368 page()->focusController().setFocusedFrame(nullptr);
368 script().clearScriptObjects(); 369 script().clearScriptObjects();
370 dart().clearScriptObjects();
369 371
370 if (page() && page()->scrollingCoordinator() && m_view) 372 if (page() && page()->scrollingCoordinator() && m_view)
371 page()->scrollingCoordinator()->willDestroyScrollableArea(m_view.get()); 373 page()->scrollingCoordinator()->willDestroyScrollableArea(m_view.get());
372 } 374 }
373 375
374 void LocalFrame::setDOMWindow(PassRefPtrWillBeRawPtr<LocalDOMWindow> domWindow) 376 void LocalFrame::setDOMWindow(PassRefPtrWillBeRawPtr<LocalDOMWindow> domWindow)
375 { 377 {
376 // Oilpan: setDOMWindow() cannot be used when finalizing. Which 378 // Oilpan: setDOMWindow() cannot be used when finalizing. Which
377 // is acceptable as its actions are either not needed or handled 379 // is acceptable as its actions are either not needed or handled
378 // by other means -- 380 // by other means --
379 // 381 //
380 // - LocalFrameLifecycleObserver::willDetachFrameHost() will have 382 // - LocalFrameLifecycleObserver::willDetachFrameHost() will have
381 // signalled the Inspector frameWindowDiscarded() notifications. 383 // signalled the Inspector frameWindowDiscarded() notifications.
382 // We assume that all LocalFrames are detached, where that notification 384 // We assume that all LocalFrames are detached, where that notification
383 // will have been done. 385 // will have been done.
384 // 386 //
385 // - Calling LocalDOMWindow::reset() is not needed (called from 387 // - Calling LocalDOMWindow::reset() is not needed (called from
386 // Frame::setDOMWindow().) The Member references it clears will now 388 // Frame::setDOMWindow().) The Member references it clears will now
387 // die with the window. And the registered DOMWindowProperty instances th at don't, 389 // die with the window. And the registered DOMWindowProperty instances th at don't,
388 // only keep a weak reference to this frame, so there's no need to be 390 // only keep a weak reference to this frame, so there's no need to be
389 // explicitly notified that this frame is going away. 391 // explicitly notified that this frame is going away.
390 if (m_domWindow && host()) 392 if (m_domWindow && host())
391 host()->consoleMessageStorage().frameWindowDiscarded(m_domWindow.get()); 393 host()->consoleMessageStorage().frameWindowDiscarded(m_domWindow.get());
392 if (domWindow) 394 if (domWindow) {
393 script().clearWindowProxy(); 395 script().clearWindowProxy();
396 dart().clearWindowShell();
397 }
394 398
395 if (m_domWindow) 399 if (m_domWindow)
396 m_domWindow->reset(); 400 m_domWindow->reset();
397 m_domWindow = domWindow; 401 m_domWindow = domWindow;
398 } 402 }
399 403
400 Document* LocalFrame::document() const 404 Document* LocalFrame::document() const
401 { 405 {
402 return m_domWindow ? m_domWindow->document() : nullptr; 406 return m_domWindow ? m_domWindow->document() : nullptr;
403 } 407 }
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 return String(); 829 return String();
826 830
827 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye rTreeFlags>(flags)); 831 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye rTreeFlags>(flags));
828 } 832 }
829 833
830 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO wner* owner) 834 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO wner* owner)
831 : Frame(client, host, owner) 835 : Frame(client, host, owner)
832 , m_loader(this) 836 , m_loader(this)
833 , m_navigationScheduler(this) 837 , m_navigationScheduler(this)
834 , m_script(ScriptController::create(this)) 838 , m_script(ScriptController::create(this))
839 , m_dart(adoptPtr(new DartController(this)))
835 , m_editor(Editor::create(*this)) 840 , m_editor(Editor::create(*this))
836 , m_spellChecker(SpellChecker::create(*this)) 841 , m_spellChecker(SpellChecker::create(*this))
837 , m_selection(FrameSelection::create(this)) 842 , m_selection(FrameSelection::create(this))
838 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this))) 843 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this)))
839 , m_console(FrameConsole::create(*this)) 844 , m_console(FrameConsole::create(*this))
840 , m_inputMethodController(InputMethodController::create(*this)) 845 , m_inputMethodController(InputMethodController::create(*this))
841 , m_pageZoomFactor(parentPageZoomFactor(this)) 846 , m_pageZoomFactor(parentPageZoomFactor(this))
842 , m_textZoomFactor(parentTextZoomFactor(this)) 847 , m_textZoomFactor(parentTextZoomFactor(this))
843 , m_inViewSourceMode(false) 848 , m_inViewSourceMode(false)
844 { 849 {
845 if (isLocalRoot()) 850 if (isLocalRoot())
846 m_instrumentingAgents = InstrumentingAgents::create(); 851 m_instrumentingAgents = InstrumentingAgents::create();
847 else 852 else
848 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; 853 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents;
849 } 854 }
850 855
851 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); 856 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame);
852 857
853 } // namespace blink 858 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/frame/NavigatorID.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698