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 <wtf/Assertions.h> | 32 #include <wtf/Assertions.h> |
33 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 | 36 |
37 FrameLoaderStateMachine::FrameLoaderStateMachine() | 37 FrameLoaderStateMachine::FrameLoaderStateMachine() |
38 : m_state(CreatingInitialEmptyDocument) | 38 : m_state(CreatingInitialEmptyDocument) |
39 { | 39 { |
40 } | 40 } |
41 | |
42 bool FrameLoaderStateMachine::committingFirstRealLoad() const | |
43 { | |
44 return m_state == DisplayingInitialEmptyDocument; | |
45 } | |
46 | 41 |
47 bool FrameLoaderStateMachine::committedFirstRealDocumentLoad() const | 42 bool FrameLoaderStateMachine::committedFirstRealDocumentLoad() const |
48 { | 43 { |
49 return m_state >= CommittedFirstRealLoad; | 44 return m_state >= CommittedFirstRealLoad; |
50 } | 45 } |
51 | 46 |
52 bool FrameLoaderStateMachine::creatingInitialEmptyDocument() const | 47 bool FrameLoaderStateMachine::creatingInitialEmptyDocument() const |
53 { | 48 { |
54 return m_state == CreatingInitialEmptyDocument; | 49 return m_state == CreatingInitialEmptyDocument; |
55 } | 50 } |
56 | 51 |
57 bool FrameLoaderStateMachine::isDisplayingInitialEmptyDocument() const | 52 bool FrameLoaderStateMachine::isDisplayingInitialEmptyDocument() const |
58 { | 53 { |
59 return m_state == DisplayingInitialEmptyDocument; | 54 return m_state == DisplayingInitialEmptyDocument; |
60 } | 55 } |
61 | 56 |
62 void FrameLoaderStateMachine::advanceTo(State state) | 57 void FrameLoaderStateMachine::advanceTo(State state) |
63 { | 58 { |
64 ASSERT(State(m_state + 1) == state); | 59 ASSERT(State(m_state + 1) == state); |
65 m_state = state; | 60 m_state = state; |
66 } | 61 } |
67 | 62 |
68 } // namespace WebCore | 63 } // namespace WebCore |
OLD | NEW |