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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2110543008: Move UndoStack from Page to Editor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use |const Member| and add notes to UndoStack class Created 4 years, 5 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) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 24 matching lines...) Expand all
35 #include "core/loader/FrameLoader.h" 35 #include "core/loader/FrameLoader.h"
36 36
37 #include "bindings/core/v8/DOMWrapperWorld.h" 37 #include "bindings/core/v8/DOMWrapperWorld.h"
38 #include "bindings/core/v8/ScriptController.h" 38 #include "bindings/core/v8/ScriptController.h"
39 #include "bindings/core/v8/SerializedScriptValue.h" 39 #include "bindings/core/v8/SerializedScriptValue.h"
40 #include "core/HTMLNames.h" 40 #include "core/HTMLNames.h"
41 #include "core/dom/Document.h" 41 #include "core/dom/Document.h"
42 #include "core/dom/Element.h" 42 #include "core/dom/Element.h"
43 #include "core/dom/ViewportDescription.h" 43 #include "core/dom/ViewportDescription.h"
44 #include "core/editing/Editor.h" 44 #include "core/editing/Editor.h"
45 #include "core/editing/commands/UndoStack.h"
46 #include "core/events/GestureEvent.h" 45 #include "core/events/GestureEvent.h"
47 #include "core/events/KeyboardEvent.h" 46 #include "core/events/KeyboardEvent.h"
48 #include "core/events/MouseEvent.h" 47 #include "core/events/MouseEvent.h"
49 #include "core/events/PageTransitionEvent.h" 48 #include "core/events/PageTransitionEvent.h"
50 #include "core/fetch/ResourceFetcher.h" 49 #include "core/fetch/ResourceFetcher.h"
51 #include "core/fetch/ResourceLoader.h" 50 #include "core/fetch/ResourceLoader.h"
52 #include "core/frame/FrameHost.h" 51 #include "core/frame/FrameHost.h"
53 #include "core/frame/FrameView.h" 52 #include "core/frame/FrameView.h"
54 #include "core/frame/LocalDOMWindow.h" 53 #include "core/frame/LocalDOMWindow.h"
55 #include "core/frame/LocalFrame.h" 54 #include "core/frame/LocalFrame.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 { 261 {
263 NavigationCounterForUnload counter; 262 NavigationCounterForUnload counter;
264 263
265 // If the frame is unloading, the provisional loader should no longer be 264 // If the frame is unloading, the provisional loader should no longer be
266 // protected. It will be detached soon. 265 // protected. It will be detached soon.
267 m_protectProvisionalLoader = false; 266 m_protectProvisionalLoader = false;
268 saveScrollState(); 267 saveScrollState();
269 268
270 if (m_frame->document() && !SVGImage::isInSVGImage(m_frame->document())) 269 if (m_frame->document() && !SVGImage::isInSVGImage(m_frame->document()))
271 m_frame->document()->dispatchUnloadEvents(); 270 m_frame->document()->dispatchUnloadEvents();
272
273 if (Page* page = m_frame->page())
274 page->undoStack().didUnloadFrame(*m_frame);
275 } 271 }
276 272
277 void FrameLoader::didExplicitOpen() 273 void FrameLoader::didExplicitOpen()
278 { 274 {
279 // Calling document.open counts as committing the first real document load. 275 // Calling document.open counts as committing the first real document load.
280 if (!m_stateMachine.committedFirstRealDocumentLoad()) 276 if (!m_stateMachine.committedFirstRealDocumentLoad())
281 m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad ); 277 m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad );
282 278
283 // Only model a document.open() as part of a navigation if its parent is not done 279 // Only model a document.open() as part of a navigation if its parent is not done
284 // or in the process of completing. 280 // or in the process of completing.
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); 1614 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String());
1619 return tracedValue; 1615 return tracedValue;
1620 } 1616 }
1621 1617
1622 inline void FrameLoader::takeObjectSnapshot() const 1618 inline void FrameLoader::takeObjectSnapshot() const
1623 { 1619 {
1624 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); 1620 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value());
1625 } 1621 }
1626 1622
1627 } // namespace blink 1623 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/UndoStack.cpp ('k') | third_party/WebKit/Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698