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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <functional> | 10 #include <functional> |
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 | 1064 |
1065 // Internal helper to create WebUI objects associated with |this|. |url| is | 1065 // Internal helper to create WebUI objects associated with |this|. |url| is |
1066 // used to determine which WebUI should be created (if any). |frame_name| | 1066 // used to determine which WebUI should be created (if any). |frame_name| |
1067 // corresponds to the name of a frame that the WebUI should be created for (or | 1067 // corresponds to the name of a frame that the WebUI should be created for (or |
1068 // the main frame if empty). | 1068 // the main frame if empty). |
1069 WebUI* CreateWebUI(const GURL& url, const std::string& frame_name); | 1069 WebUI* CreateWebUI(const GURL& url, const std::string& frame_name); |
1070 | 1070 |
1071 void SetJavaScriptDialogManagerForTesting( | 1071 void SetJavaScriptDialogManagerForTesting( |
1072 JavaScriptDialogManager* dialog_manager); | 1072 JavaScriptDialogManager* dialog_manager); |
1073 | 1073 |
| 1074 // Returns the outermost WebContents in this WebContents's tree. |
| 1075 WebContentsImpl* GetOutermostWebContents(); |
| 1076 |
1074 // Returns the FindRequestManager, or creates one if it doesn't already exist. | 1077 // Returns the FindRequestManager, or creates one if it doesn't already exist. |
1075 FindRequestManager* GetOrCreateFindRequestManager(); | 1078 FindRequestManager* GetOrCreateFindRequestManager(); |
1076 | 1079 |
1077 // Data for core operation --------------------------------------------------- | 1080 // Data for core operation --------------------------------------------------- |
1078 | 1081 |
1079 // Delegate for notifying our owner about stuff. Not owned by us. | 1082 // Delegate for notifying our owner about stuff. Not owned by us. |
1080 WebContentsDelegate* delegate_; | 1083 WebContentsDelegate* delegate_; |
1081 | 1084 |
1082 // Handles the back/forward list and loading. | 1085 // Handles the back/forward list and loading. |
1083 NavigationControllerImpl controller_; | 1086 NavigationControllerImpl controller_; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 // Manages the frame tree of the page and process swaps in each node. | 1121 // Manages the frame tree of the page and process swaps in each node. |
1119 FrameTree frame_tree_; | 1122 FrameTree frame_tree_; |
1120 | 1123 |
1121 // If this WebContents is part of a "tree of WebContents", then this contains | 1124 // If this WebContents is part of a "tree of WebContents", then this contains |
1122 // information about the structure. | 1125 // information about the structure. |
1123 std::unique_ptr<WebContentsTreeNode> node_; | 1126 std::unique_ptr<WebContentsTreeNode> node_; |
1124 | 1127 |
1125 // SavePackage, lazily created. | 1128 // SavePackage, lazily created. |
1126 scoped_refptr<SavePackage> save_package_; | 1129 scoped_refptr<SavePackage> save_package_; |
1127 | 1130 |
1128 // Manages/coordinates find-in-page requests. Created lazily. | 1131 // Manages/coordinates multi-process find-in-page requests. Created lazily. |
1129 std::unique_ptr<FindRequestManager> find_request_manager_; | 1132 std::unique_ptr<FindRequestManager> find_request_manager_; |
1130 | 1133 |
1131 // Data for loading state ---------------------------------------------------- | 1134 // Data for loading state ---------------------------------------------------- |
1132 | 1135 |
1133 // Indicates whether the current load is to a different document. Only valid | 1136 // Indicates whether the current load is to a different document. Only valid |
1134 // if is_loading_ is true. | 1137 // if is_loading_ is true. |
1135 bool is_load_to_different_document_; | 1138 bool is_load_to_different_document_; |
1136 | 1139 |
1137 // Indicates if the tab is considered crashed. | 1140 // Indicates if the tab is considered crashed. |
1138 base::TerminationStatus crashed_status_; | 1141 base::TerminationStatus crashed_status_; |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 // Adds/removes a callback called on creation of each new WebContents. | 1397 // Adds/removes a callback called on creation of each new WebContents. |
1395 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1398 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1396 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1399 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1397 | 1400 |
1398 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1401 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1399 }; | 1402 }; |
1400 | 1403 |
1401 } // namespace content | 1404 } // namespace content |
1402 | 1405 |
1403 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1406 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |