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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoaderStateMachine.h

Issue 1964803002: Trace FrameLoader object snapshots (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win failure Created 4 years, 7 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 14 matching lines...) Expand all
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #ifndef FrameLoaderStateMachine_h 29 #ifndef FrameLoaderStateMachine_h
30 #define FrameLoaderStateMachine_h 30 #define FrameLoaderStateMachine_h
31 31
32 #include "core/CoreExport.h" 32 #include "core/CoreExport.h"
33 #include "wtf/Allocator.h" 33 #include "wtf/Allocator.h"
34 #include "wtf/Noncopyable.h" 34 #include "wtf/Noncopyable.h"
35 #include "wtf/text/WTFString.h"
35 36
36 namespace blink { 37 namespace blink {
37 38
38 // Encapsulates a state machine for FrameLoader. Note that this is different fro m FrameState, 39 // Encapsulates a state machine for FrameLoader. Note that this is different fro m FrameState,
39 // which stores the state of the current load that FrameLoader is executing. 40 // which stores the state of the current load that FrameLoader is executing.
40 class CORE_EXPORT FrameLoaderStateMachine { 41 class CORE_EXPORT FrameLoaderStateMachine {
41 DISALLOW_NEW(); 42 DISALLOW_NEW();
42 WTF_MAKE_NONCOPYABLE(FrameLoaderStateMachine); 43 WTF_MAKE_NONCOPYABLE(FrameLoaderStateMachine);
43 public: 44 public:
44 FrameLoaderStateMachine(); 45 FrameLoaderStateMachine();
45 46
46 // Once a load has been committed, the state may 47 // Once a load has been committed, the state may
47 // alternate between CommittedFirstRealLoad and FirstLayoutDone. 48 // alternate between CommittedFirstRealLoad and FirstLayoutDone.
48 // Otherwise, the states only go down the list. 49 // Otherwise, the states only go down the list.
49 enum State { 50 enum State {
50 CreatingInitialEmptyDocument, 51 CreatingInitialEmptyDocument,
51 DisplayingInitialEmptyDocument, 52 DisplayingInitialEmptyDocument,
52 CommittedFirstRealLoad, 53 CommittedFirstRealLoad,
53 CommittedMultipleRealLoads 54 CommittedMultipleRealLoads
54 }; 55 };
55 56
56 bool committedFirstRealDocumentLoad() const; 57 bool committedFirstRealDocumentLoad() const;
57 bool creatingInitialEmptyDocument() const; 58 bool creatingInitialEmptyDocument() const;
58 bool isDisplayingInitialEmptyDocument() const; 59 bool isDisplayingInitialEmptyDocument() const;
59 bool committedMultipleRealLoads() const; 60 bool committedMultipleRealLoads() const;
60 void advanceTo(State); 61 void advanceTo(State);
61 62
63 String toString() const;
64
62 private: 65 private:
63 State m_state; 66 State m_state;
64 }; 67 };
65 68
66 } // namespace blink 69 } // namespace blink
67 70
68 #endif // FrameLoaderStateMachine_h 71 #endif // FrameLoaderStateMachine_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698