OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 void completeProgress(unsigned long identifier); | 59 void completeProgress(unsigned long identifier); |
60 | 60 |
61 long long totalPageAndResourceBytesToLoad() const { return m_totalPageAndRes
ourceBytesToLoad; } | 61 long long totalPageAndResourceBytesToLoad() const { return m_totalPageAndRes
ourceBytesToLoad; } |
62 long long totalBytesReceived() const { return m_totalBytesReceived; } | 62 long long totalBytesReceived() const { return m_totalBytesReceived; } |
63 | 63 |
64 private: | 64 private: |
65 ProgressTracker(LocalFrame*); | 65 ProgressTracker(LocalFrame*); |
66 | 66 |
67 void reset(); | 67 void reset(); |
68 | 68 |
| 69 // This bare frame pointer is safe; it refers to the |
| 70 // owning frame (via FrameLoader.) |
| 71 // |
| 72 // ProgressTracker is finalized by FrameLoader (which in turn is |
| 73 // finalized by LocalFrame.) Its lifetime thus guarantees that |
| 74 // m_frame cannot be used to access a dead LocalFrame. |
| 75 // |
| 76 // FIXME: Oilpan: tidy up and move ProgressTracker to the heap. |
69 LocalFrame* m_frame; | 77 LocalFrame* m_frame; |
70 bool m_inProgress; | 78 bool m_inProgress; |
71 long long m_totalPageAndResourceBytesToLoad; | 79 long long m_totalPageAndResourceBytesToLoad; |
72 long long m_totalBytesReceived; | 80 long long m_totalBytesReceived; |
73 double m_lastNotifiedProgressValue; | 81 double m_lastNotifiedProgressValue; |
74 double m_lastNotifiedProgressTime; | 82 double m_lastNotifiedProgressTime; |
75 double m_progressNotificationInterval; | 83 double m_progressNotificationInterval; |
76 double m_progressNotificationTimeInterval; | 84 double m_progressNotificationTimeInterval; |
77 bool m_finalProgressChangedSent; | 85 bool m_finalProgressChangedSent; |
78 double m_progressValue; | 86 double m_progressValue; |
79 | 87 |
80 HashMap<unsigned long, OwnPtr<ProgressItem> > m_progressItems; | 88 HashMap<unsigned long, OwnPtr<ProgressItem> > m_progressItems; |
81 }; | 89 }; |
82 | 90 |
83 } | 91 } |
84 | 92 |
85 #endif | 93 #endif |
OLD | NEW |