| 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_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 typedef std::vector<int64> PlayerList; | 960 typedef std::vector<int64> PlayerList; |
| 961 typedef std::map<uintptr_t, PlayerList> ActiveMediaPlayerMap; | 961 typedef std::map<uintptr_t, PlayerList> ActiveMediaPlayerMap; |
| 962 void AddMediaPlayerEntry(int64 player_cookie, | 962 void AddMediaPlayerEntry(int64 player_cookie, |
| 963 ActiveMediaPlayerMap* player_map); | 963 ActiveMediaPlayerMap* player_map); |
| 964 void RemoveMediaPlayerEntry(int64 player_cookie, | 964 void RemoveMediaPlayerEntry(int64 player_cookie, |
| 965 ActiveMediaPlayerMap* player_map); | 965 ActiveMediaPlayerMap* player_map); |
| 966 // Removes all entries from |player_map| for |render_frame_host|. | 966 // Removes all entries from |player_map| for |render_frame_host|. |
| 967 void RemoveAllMediaPlayerEntries(RenderFrameHost* render_frame_host, | 967 void RemoveAllMediaPlayerEntries(RenderFrameHost* render_frame_host, |
| 968 ActiveMediaPlayerMap* player_map); | 968 ActiveMediaPlayerMap* player_map); |
| 969 | 969 |
| 970 // Returns true if at least one of the nodes in the |frame_tree_| is loading, |
| 971 // false otherwise. |
| 972 bool IsFrameTreeLoading(); |
| 973 |
| 970 // Data for core operation --------------------------------------------------- | 974 // Data for core operation --------------------------------------------------- |
| 971 | 975 |
| 972 // Delegate for notifying our owner about stuff. Not owned by us. | 976 // Delegate for notifying our owner about stuff. Not owned by us. |
| 973 WebContentsDelegate* delegate_; | 977 WebContentsDelegate* delegate_; |
| 974 | 978 |
| 975 // Handles the back/forward list and loading. | 979 // Handles the back/forward list and loading. |
| 976 NavigationControllerImpl controller_; | 980 NavigationControllerImpl controller_; |
| 977 | 981 |
| 978 // The corresponding view. | 982 // The corresponding view. |
| 979 scoped_ptr<WebContentsView> view_; | 983 scoped_ptr<WebContentsView> view_; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 | 1052 |
| 1049 // Map of SiteInstance ID to max page ID for this tab. A page ID is specific | 1053 // Map of SiteInstance ID to max page ID for this tab. A page ID is specific |
| 1050 // to a given tab and SiteInstance, and must be valid for the lifetime of the | 1054 // to a given tab and SiteInstance, and must be valid for the lifetime of the |
| 1051 // WebContentsImpl. | 1055 // WebContentsImpl. |
| 1052 std::map<int32, int32> max_page_ids_; | 1056 std::map<int32, int32> max_page_ids_; |
| 1053 | 1057 |
| 1054 // The current load state and the URL associated with it. | 1058 // The current load state and the URL associated with it. |
| 1055 net::LoadStateWithParam load_state_; | 1059 net::LoadStateWithParam load_state_; |
| 1056 base::string16 load_state_host_; | 1060 base::string16 load_state_host_; |
| 1057 | 1061 |
| 1058 // LoadingProgressMap maps FrameTreeNode IDs to a double representing that | |
| 1059 // frame's completion (from 0 to 1). | |
| 1060 typedef base::hash_map<int64, double> LoadingProgressMap; | |
| 1061 LoadingProgressMap loading_progresses_; | |
| 1062 double loading_total_progress_; | 1062 double loading_total_progress_; |
| 1063 | 1063 |
| 1064 base::TimeTicks loading_last_progress_update_; | 1064 base::TimeTicks loading_last_progress_update_; |
| 1065 | 1065 |
| 1066 // Counter to track how many frames have sent start notifications but not | |
| 1067 // stop notifications. | |
| 1068 int loading_frames_in_progress_; | |
| 1069 | |
| 1070 // Upload progress, for displaying in the status bar. | 1066 // Upload progress, for displaying in the status bar. |
| 1071 // Set to zero when there is no significant upload happening. | 1067 // Set to zero when there is no significant upload happening. |
| 1072 uint64 upload_size_; | 1068 uint64 upload_size_; |
| 1073 uint64 upload_position_; | 1069 uint64 upload_position_; |
| 1074 | 1070 |
| 1075 // Data for current page ----------------------------------------------------- | 1071 // Data for current page ----------------------------------------------------- |
| 1076 | 1072 |
| 1077 // When a title cannot be taken from any entry, this title will be used. | 1073 // When a title cannot be taken from any entry, this title will be used. |
| 1078 base::string16 page_title_when_no_navigation_entry_; | 1074 base::string16 page_title_when_no_navigation_entry_; |
| 1079 | 1075 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1267 // Adds/removes a callback called on creation of each new WebContents. | 1263 // Adds/removes a callback called on creation of each new WebContents. |
| 1268 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1264 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1269 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1265 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1270 | 1266 |
| 1271 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1267 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
| 1272 }; | 1268 }; |
| 1273 | 1269 |
| 1274 } // namespace content | 1270 } // namespace content |
| 1275 | 1271 |
| 1276 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1272 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |