Chromium Code Reviews| 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 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 959 typedef std::vector<int64> PlayerList; | 959 typedef std::vector<int64> PlayerList; |
| 960 typedef std::map<uintptr_t, PlayerList> ActiveMediaPlayerMap; | 960 typedef std::map<uintptr_t, PlayerList> ActiveMediaPlayerMap; |
| 961 void AddMediaPlayerEntry(int64 player_cookie, | 961 void AddMediaPlayerEntry(int64 player_cookie, |
| 962 ActiveMediaPlayerMap* player_map); | 962 ActiveMediaPlayerMap* player_map); |
| 963 void RemoveMediaPlayerEntry(int64 player_cookie, | 963 void RemoveMediaPlayerEntry(int64 player_cookie, |
| 964 ActiveMediaPlayerMap* player_map); | 964 ActiveMediaPlayerMap* player_map); |
| 965 // Removes all entries from |player_map| for |render_frame_host|. | 965 // Removes all entries from |player_map| for |render_frame_host|. |
| 966 void RemoveAllMediaPlayerEntries(RenderFrameHost* render_frame_host, | 966 void RemoveAllMediaPlayerEntries(RenderFrameHost* render_frame_host, |
| 967 ActiveMediaPlayerMap* player_map); | 967 ActiveMediaPlayerMap* player_map); |
| 968 | 968 |
| 969 // Returns true if one of the nodes in the frame_tree_ is loading, | |
|
nasko
2015/02/13 00:16:29
nit: "at least one of", |frame_tree_|
Fabrice (no longer in Chrome)
2015/02/13 18:04:25
Done.
| |
| 970 // false otherwise. | |
|
carlosk
2015/02/13 15:05:41
nit: the otherwise case here seems redundant.
Fabrice (no longer in Chrome)
2015/02/24 13:14:46
Not sure about the style, but there are some other
carlosk
2015/03/02 14:17:28
Acknowledged.
| |
| 971 bool IsTreeLoading(); | |
|
Charlie Reis
2015/02/13 01:01:51
nit: IsLoading might be clearer.
Fabrice (no longer in Chrome)
2015/02/13 18:04:25
There already is an IsLoading in WebContents imple
| |
| 972 | |
| 969 // Data for core operation --------------------------------------------------- | 973 // Data for core operation --------------------------------------------------- |
| 970 | 974 |
| 971 // Delegate for notifying our owner about stuff. Not owned by us. | 975 // Delegate for notifying our owner about stuff. Not owned by us. |
| 972 WebContentsDelegate* delegate_; | 976 WebContentsDelegate* delegate_; |
| 973 | 977 |
| 974 // Handles the back/forward list and loading. | 978 // Handles the back/forward list and loading. |
| 975 NavigationControllerImpl controller_; | 979 NavigationControllerImpl controller_; |
| 976 | 980 |
| 977 // The corresponding view. | 981 // The corresponding view. |
| 978 scoped_ptr<WebContentsView> view_; | 982 scoped_ptr<WebContentsView> view_; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1047 | 1051 |
| 1048 // Map of SiteInstance ID to max page ID for this tab. A page ID is specific | 1052 // Map of SiteInstance ID to max page ID for this tab. A page ID is specific |
| 1049 // to a given tab and SiteInstance, and must be valid for the lifetime of the | 1053 // to a given tab and SiteInstance, and must be valid for the lifetime of the |
| 1050 // WebContentsImpl. | 1054 // WebContentsImpl. |
| 1051 std::map<int32, int32> max_page_ids_; | 1055 std::map<int32, int32> max_page_ids_; |
| 1052 | 1056 |
| 1053 // The current load state and the URL associated with it. | 1057 // The current load state and the URL associated with it. |
| 1054 net::LoadStateWithParam load_state_; | 1058 net::LoadStateWithParam load_state_; |
| 1055 base::string16 load_state_host_; | 1059 base::string16 load_state_host_; |
| 1056 | 1060 |
| 1057 // LoadingProgressMap maps FrameTreeNode IDs to a double representing that | |
| 1058 // frame's completion (from 0 to 1). | |
| 1059 typedef base::hash_map<int64, double> LoadingProgressMap; | |
| 1060 LoadingProgressMap loading_progresses_; | |
| 1061 double loading_total_progress_; | 1061 double loading_total_progress_; |
| 1062 | 1062 |
| 1063 base::TimeTicks loading_last_progress_update_; | 1063 base::TimeTicks loading_last_progress_update_; |
| 1064 | 1064 |
| 1065 // Counter to track how many frames have sent start notifications but not | |
| 1066 // stop notifications. | |
| 1067 int loading_frames_in_progress_; | |
| 1068 | |
| 1069 // Upload progress, for displaying in the status bar. | 1065 // Upload progress, for displaying in the status bar. |
| 1070 // Set to zero when there is no significant upload happening. | 1066 // Set to zero when there is no significant upload happening. |
| 1071 uint64 upload_size_; | 1067 uint64 upload_size_; |
| 1072 uint64 upload_position_; | 1068 uint64 upload_position_; |
| 1073 | 1069 |
| 1074 // Data for current page ----------------------------------------------------- | 1070 // Data for current page ----------------------------------------------------- |
| 1075 | 1071 |
| 1076 // When a title cannot be taken from any entry, this title will be used. | 1072 // When a title cannot be taken from any entry, this title will be used. |
| 1077 base::string16 page_title_when_no_navigation_entry_; | 1073 base::string16 page_title_when_no_navigation_entry_; |
| 1078 | 1074 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1266 // Adds/removes a callback called on creation of each new WebContents. | 1262 // Adds/removes a callback called on creation of each new WebContents. |
| 1267 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1263 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1268 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1264 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1269 | 1265 |
| 1270 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1266 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
| 1271 }; | 1267 }; |
| 1272 | 1268 |
| 1273 } // namespace content | 1269 } // namespace content |
| 1274 | 1270 |
| 1275 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1271 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |