OLD | NEW |
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 20 matching lines...) Expand all Loading... |
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 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 // Encapsulates a state machine for FrameLoader. Note that this is different fro
m FrameState, | 38 // 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. | 39 // which stores the state of the current load that FrameLoader is executing. |
40 class CORE_EXPORT FrameLoaderStateMachine { | 40 class CORE_EXPORT FrameLoaderStateMachine { |
41 DISALLOW_ALLOCATION(); | 41 DISALLOW_NEW(); |
42 WTF_MAKE_NONCOPYABLE(FrameLoaderStateMachine); | 42 WTF_MAKE_NONCOPYABLE(FrameLoaderStateMachine); |
43 public: | 43 public: |
44 FrameLoaderStateMachine(); | 44 FrameLoaderStateMachine(); |
45 | 45 |
46 // Once a load has been committed, the state may | 46 // Once a load has been committed, the state may |
47 // alternate between CommittedFirstRealLoad and FirstLayoutDone. | 47 // alternate between CommittedFirstRealLoad and FirstLayoutDone. |
48 // Otherwise, the states only go down the list. | 48 // Otherwise, the states only go down the list. |
49 enum State { | 49 enum State { |
50 CreatingInitialEmptyDocument, | 50 CreatingInitialEmptyDocument, |
51 DisplayingInitialEmptyDocument, | 51 DisplayingInitialEmptyDocument, |
52 CommittedFirstRealLoad, | 52 CommittedFirstRealLoad, |
53 CommittedMultipleRealLoads | 53 CommittedMultipleRealLoads |
54 }; | 54 }; |
55 | 55 |
56 bool committedFirstRealDocumentLoad() const; | 56 bool committedFirstRealDocumentLoad() const; |
57 bool creatingInitialEmptyDocument() const; | 57 bool creatingInitialEmptyDocument() const; |
58 bool isDisplayingInitialEmptyDocument() const; | 58 bool isDisplayingInitialEmptyDocument() const; |
59 bool committedMultipleRealLoads() const; | 59 bool committedMultipleRealLoads() const; |
60 void advanceTo(State); | 60 void advanceTo(State); |
61 | 61 |
62 private: | 62 private: |
63 State m_state; | 63 State m_state; |
64 }; | 64 }; |
65 | 65 |
66 } // namespace blink | 66 } // namespace blink |
67 | 67 |
68 #endif // FrameLoaderStateMachine_h | 68 #endif // FrameLoaderStateMachine_h |
OLD | NEW |