| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 // navigations, the history may have some entries that were committed in other | 710 // navigations, the history may have some entries that were committed in other |
| 711 // processes. We won't know about them until the next navigation in this | 711 // processes. We won't know about them until the next navigation in this |
| 712 // process. | 712 // process. |
| 713 int history_list_length_; | 713 int history_list_length_; |
| 714 | 714 |
| 715 // Counter to track how many frames have sent start notifications but not stop | 715 // Counter to track how many frames have sent start notifications but not stop |
| 716 // notifications. TODO(avi): Remove this once DidStartLoading/DidStopLoading | 716 // notifications. TODO(avi): Remove this once DidStartLoading/DidStopLoading |
| 717 // are gone. | 717 // are gone. |
| 718 int frames_in_progress_; | 718 int frames_in_progress_; |
| 719 | 719 |
| 720 // Keeps track of the unique names of future subframes that the browser |
| 721 // process has history items for during a history navigation, as well as the |
| 722 // corresponding PageState to use when creating such frames during a |
| 723 // back/forward navigation. This map includes state for any frames in the |
| 724 // page, even when concurrent back/forward navigations affect different |
| 725 // subtrees. |
| 726 // |
| 727 // If the PageState for a frame is empty, the history item needs to load in a |
| 728 // different process, so the renderer process should ask the browser process |
| 729 // to handle it instead |
| 730 // |
| 731 // This state is incrementally cleared as it is used. |
| 732 // TODO(creis): Can it be reset at any point? This seems important, so that a |
| 733 // frame on one page doesn't use an unused history item from the previous |
| 734 // page. |
| 735 std::unordered_map<std::string, PageState> history_page_states_; |
| 736 |
| 720 // UI state ------------------------------------------------------------------ | 737 // UI state ------------------------------------------------------------------ |
| 721 | 738 |
| 722 // The state of our target_url transmissions. When we receive a request to | 739 // The state of our target_url transmissions. When we receive a request to |
| 723 // send a URL to the browser, we set this to TARGET_INFLIGHT until an ACK | 740 // send a URL to the browser, we set this to TARGET_INFLIGHT until an ACK |
| 724 // comes back - if a new request comes in before the ACK, we store the new | 741 // comes back - if a new request comes in before the ACK, we store the new |
| 725 // URL in pending_target_url_ and set the status to TARGET_PENDING. If an | 742 // URL in pending_target_url_ and set the status to TARGET_PENDING. If an |
| 726 // ACK comes back and we are in TARGET_PENDING, we send the stored URL and | 743 // ACK comes back and we are in TARGET_PENDING, we send the stored URL and |
| 727 // revert to TARGET_INFLIGHT. | 744 // revert to TARGET_INFLIGHT. |
| 728 // | 745 // |
| 729 // We don't need a queue of URLs to send, as only the latest is useful. | 746 // We don't need a queue of URLs to send, as only the latest is useful. |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 // use the Observer interface to filter IPC messages and receive frame change | 869 // use the Observer interface to filter IPC messages and receive frame change |
| 853 // notifications. | 870 // notifications. |
| 854 // --------------------------------------------------------------------------- | 871 // --------------------------------------------------------------------------- |
| 855 | 872 |
| 856 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 873 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 857 }; | 874 }; |
| 858 | 875 |
| 859 } // namespace content | 876 } // namespace content |
| 860 | 877 |
| 861 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 878 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |