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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 | 1068 |
1069 // Internal helper to create WebUI objects associated with |this|. |url| is | 1069 // Internal helper to create WebUI objects associated with |this|. |url| is |
1070 // used to determine which WebUI should be created (if any). |frame_name| | 1070 // used to determine which WebUI should be created (if any). |frame_name| |
1071 // corresponds to the name of a frame that the WebUI should be created for (or | 1071 // corresponds to the name of a frame that the WebUI should be created for (or |
1072 // the main frame if empty). | 1072 // the main frame if empty). |
1073 WebUI* CreateWebUI(const GURL& url, const std::string& frame_name); | 1073 WebUI* CreateWebUI(const GURL& url, const std::string& frame_name); |
1074 | 1074 |
1075 void SetJavaScriptDialogManagerForTesting( | 1075 void SetJavaScriptDialogManagerForTesting( |
1076 JavaScriptDialogManager* dialog_manager); | 1076 JavaScriptDialogManager* dialog_manager); |
1077 | 1077 |
| 1078 // Returns the outermost WebContents in this WebContents's tree. |
| 1079 WebContentsImpl* GetOutermostWebContents(); |
| 1080 |
1078 // Returns the FindRequestManager, or creates one if it doesn't already exist. | 1081 // Returns the FindRequestManager, or creates one if it doesn't already exist. |
1079 FindRequestManager* GetOrCreateFindRequestManager(); | 1082 FindRequestManager* GetOrCreateFindRequestManager(); |
1080 | 1083 |
1081 // Data for core operation --------------------------------------------------- | 1084 // Data for core operation --------------------------------------------------- |
1082 | 1085 |
1083 // Delegate for notifying our owner about stuff. Not owned by us. | 1086 // Delegate for notifying our owner about stuff. Not owned by us. |
1084 WebContentsDelegate* delegate_; | 1087 WebContentsDelegate* delegate_; |
1085 | 1088 |
1086 // Handles the back/forward list and loading. | 1089 // Handles the back/forward list and loading. |
1087 NavigationControllerImpl controller_; | 1090 NavigationControllerImpl controller_; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 // Manages the frame tree of the page and process swaps in each node. | 1125 // Manages the frame tree of the page and process swaps in each node. |
1123 FrameTree frame_tree_; | 1126 FrameTree frame_tree_; |
1124 | 1127 |
1125 // If this WebContents is part of a "tree of WebContents", then this contains | 1128 // If this WebContents is part of a "tree of WebContents", then this contains |
1126 // information about the structure. | 1129 // information about the structure. |
1127 std::unique_ptr<WebContentsTreeNode> node_; | 1130 std::unique_ptr<WebContentsTreeNode> node_; |
1128 | 1131 |
1129 // SavePackage, lazily created. | 1132 // SavePackage, lazily created. |
1130 scoped_refptr<SavePackage> save_package_; | 1133 scoped_refptr<SavePackage> save_package_; |
1131 | 1134 |
1132 // Manages/coordinates find-in-page requests. Created lazily. | 1135 // Manages/coordinates multi-process find-in-page requests. Created lazily. |
1133 std::unique_ptr<FindRequestManager> find_request_manager_; | 1136 std::unique_ptr<FindRequestManager> find_request_manager_; |
1134 | 1137 |
1135 // Data for loading state ---------------------------------------------------- | 1138 // Data for loading state ---------------------------------------------------- |
1136 | 1139 |
1137 // Indicates whether the current load is to a different document. Only valid | 1140 // Indicates whether the current load is to a different document. Only valid |
1138 // if is_loading_ is true. | 1141 // if is_loading_ is true. |
1139 bool is_load_to_different_document_; | 1142 bool is_load_to_different_document_; |
1140 | 1143 |
1141 // Indicates if the tab is considered crashed. | 1144 // Indicates if the tab is considered crashed. |
1142 base::TerminationStatus crashed_status_; | 1145 base::TerminationStatus crashed_status_; |
(...skipping 251 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 |