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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 | 1073 |
1074 // Internal helper to create WebUI objects associated with |this|. |url| is | 1074 // Internal helper to create WebUI objects associated with |this|. |url| is |
1075 // used to determine which WebUI should be created (if any). |frame_name| | 1075 // used to determine which WebUI should be created (if any). |frame_name| |
1076 // corresponds to the name of a frame that the WebUI should be created for (or | 1076 // corresponds to the name of a frame that the WebUI should be created for (or |
1077 // the main frame if empty). | 1077 // the main frame if empty). |
1078 WebUI* CreateWebUI(const GURL& url, const std::string& frame_name); | 1078 WebUI* CreateWebUI(const GURL& url, const std::string& frame_name); |
1079 | 1079 |
1080 void SetJavaScriptDialogManagerForTesting( | 1080 void SetJavaScriptDialogManagerForTesting( |
1081 JavaScriptDialogManager* dialog_manager); | 1081 JavaScriptDialogManager* dialog_manager); |
1082 | 1082 |
| 1083 // Returns the outermost WebContents in this WebContents's tree. |
| 1084 WebContentsImpl* GetOutermostWebContents(); |
| 1085 |
1083 // Returns the FindRequestManager, or creates one if it doesn't already exist. | 1086 // Returns the FindRequestManager, or creates one if it doesn't already exist. |
1084 FindRequestManager* GetOrCreateFindRequestManager(); | 1087 FindRequestManager* GetOrCreateFindRequestManager(); |
1085 | 1088 |
1086 // Data for core operation --------------------------------------------------- | 1089 // Data for core operation --------------------------------------------------- |
1087 | 1090 |
1088 // Delegate for notifying our owner about stuff. Not owned by us. | 1091 // Delegate for notifying our owner about stuff. Not owned by us. |
1089 WebContentsDelegate* delegate_; | 1092 WebContentsDelegate* delegate_; |
1090 | 1093 |
1091 // Handles the back/forward list and loading. | 1094 // Handles the back/forward list and loading. |
1092 NavigationControllerImpl controller_; | 1095 NavigationControllerImpl controller_; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 // Manages the frame tree of the page and process swaps in each node. | 1129 // Manages the frame tree of the page and process swaps in each node. |
1127 FrameTree frame_tree_; | 1130 FrameTree frame_tree_; |
1128 | 1131 |
1129 // If this WebContents is part of a "tree of WebContents", then this contains | 1132 // If this WebContents is part of a "tree of WebContents", then this contains |
1130 // information about the structure. | 1133 // information about the structure. |
1131 std::unique_ptr<WebContentsTreeNode> node_; | 1134 std::unique_ptr<WebContentsTreeNode> node_; |
1132 | 1135 |
1133 // SavePackage, lazily created. | 1136 // SavePackage, lazily created. |
1134 scoped_refptr<SavePackage> save_package_; | 1137 scoped_refptr<SavePackage> save_package_; |
1135 | 1138 |
1136 // Manages/coordinates find-in-page requests. Created lazily. | 1139 // Manages/coordinates multi-process find-in-page requests. Created lazily. |
1137 std::unique_ptr<FindRequestManager> find_request_manager_; | 1140 std::unique_ptr<FindRequestManager> find_request_manager_; |
1138 | 1141 |
1139 // Data for loading state ---------------------------------------------------- | 1142 // Data for loading state ---------------------------------------------------- |
1140 | 1143 |
1141 // Indicates whether the current load is to a different document. Only valid | 1144 // Indicates whether the current load is to a different document. Only valid |
1142 // if is_loading_ is true. | 1145 // if is_loading_ is true. |
1143 bool is_load_to_different_document_; | 1146 bool is_load_to_different_document_; |
1144 | 1147 |
1145 // Indicates if the tab is considered crashed. | 1148 // Indicates if the tab is considered crashed. |
1146 base::TerminationStatus crashed_status_; | 1149 base::TerminationStatus crashed_status_; |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 // Adds/removes a callback called on creation of each new WebContents. | 1405 // Adds/removes a callback called on creation of each new WebContents. |
1403 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1406 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1404 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1407 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1405 | 1408 |
1406 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1409 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1407 }; | 1410 }; |
1408 | 1411 |
1409 } // namespace content | 1412 } // namespace content |
1410 | 1413 |
1411 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1414 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |