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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 const std::string& frame_name) override; | 271 const std::string& frame_name) override; |
272 WebUI* GetWebUI() const override; | 272 WebUI* GetWebUI() const override; |
273 WebUI* GetCommittedWebUI() const override; | 273 WebUI* GetCommittedWebUI() const override; |
274 void SetUserAgentOverride(const std::string& override) override; | 274 void SetUserAgentOverride(const std::string& override) override; |
275 const std::string& GetUserAgentOverride() const override; | 275 const std::string& GetUserAgentOverride() const override; |
276 void EnableTreeOnlyAccessibilityMode() override; | 276 void EnableTreeOnlyAccessibilityMode() override; |
277 bool IsTreeOnlyAccessibilityModeForTesting() const override; | 277 bool IsTreeOnlyAccessibilityModeForTesting() const override; |
278 bool IsFullAccessibilityModeForTesting() const override; | 278 bool IsFullAccessibilityModeForTesting() const override; |
279 const PageImportanceSignals& GetPageImportanceSignals() const override; | 279 const PageImportanceSignals& GetPageImportanceSignals() const override; |
280 const base::string16& GetTitle() const override; | 280 const base::string16& GetTitle() const override; |
| 281 void UpdateTitleForEntry(NavigationEntry* entry, |
| 282 const base::string16& title) override; |
281 int32_t GetMaxPageID() override; | 283 int32_t GetMaxPageID() override; |
282 int32_t GetMaxPageIDForSiteInstance(SiteInstance* site_instance) override; | 284 int32_t GetMaxPageIDForSiteInstance(SiteInstance* site_instance) override; |
283 SiteInstanceImpl* GetSiteInstance() const override; | 285 SiteInstanceImpl* GetSiteInstance() const override; |
284 SiteInstanceImpl* GetPendingSiteInstance() const override; | 286 SiteInstanceImpl* GetPendingSiteInstance() const override; |
285 bool IsLoading() const override; | 287 bool IsLoading() const override; |
286 bool IsLoadingToDifferentDocument() const override; | 288 bool IsLoadingToDifferentDocument() const override; |
287 bool IsWaitingForResponse() const override; | 289 bool IsWaitingForResponse() const override; |
288 const net::LoadStateWithParam& GetLoadState() const override; | 290 const net::LoadStateWithParam& GetLoadState() const override; |
289 const base::string16& GetLoadStateHost() const override; | 291 const base::string16& GetLoadStateHost() const override; |
290 uint64_t GetUploadSize() const override; | 292 uint64_t GetUploadSize() const override; |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, | 798 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, |
797 TwoSubframesCreatePopupMenuWidgetsSimultaneously); | 799 TwoSubframesCreatePopupMenuWidgetsSimultaneously); |
798 FRIEND_TEST_ALL_PREFIXES(SitePerProcessAccessibilityBrowserTest, | 800 FRIEND_TEST_ALL_PREFIXES(SitePerProcessAccessibilityBrowserTest, |
799 CrossSiteIframeAccessibility); | 801 CrossSiteIframeAccessibility); |
800 FRIEND_TEST_ALL_PREFIXES(WebContentsImplBrowserTest, | 802 FRIEND_TEST_ALL_PREFIXES(WebContentsImplBrowserTest, |
801 JavaScriptDialogsInMainAndSubframes); | 803 JavaScriptDialogsInMainAndSubframes); |
802 | 804 |
803 // So |find_request_manager_| can be accessed for testing. | 805 // So |find_request_manager_| can be accessed for testing. |
804 friend class FindRequestManagerTest; | 806 friend class FindRequestManagerTest; |
805 | 807 |
806 // So InterstitialPageImpl can access SetIsLoading. | |
807 friend class InterstitialPageImpl; | |
808 | |
809 // TODO(brettw) TestWebContents shouldn't exist! | 808 // TODO(brettw) TestWebContents shouldn't exist! |
810 friend class TestWebContents; | 809 friend class TestWebContents; |
811 | 810 |
812 class DestructionObserver; | 811 class DestructionObserver; |
813 | 812 |
814 // Represents a WebContents node in a tree of WebContents structure. | 813 // Represents a WebContents node in a tree of WebContents structure. |
815 // | 814 // |
816 // Two WebContents with separate FrameTrees can be connected by | 815 // Two WebContents with separate FrameTrees can be connected by |
817 // outer/inner relationship using this class. Note that their FrameTrees | 816 // outer/inner relationship using this class. Note that their FrameTrees |
818 // still remain disjoint. | 817 // still remain disjoint. |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 // committed to the navigation controller. Note that the navigation entry is | 989 // committed to the navigation controller. Note that the navigation entry is |
991 // not provided since it may be invalid/changed after being committed. The | 990 // not provided since it may be invalid/changed after being committed. The |
992 // current navigation entry is in the NavigationController at this point. | 991 // current navigation entry is in the NavigationController at this point. |
993 | 992 |
994 // If our controller was restored, update the max page ID associated with the | 993 // If our controller was restored, update the max page ID associated with the |
995 // given RenderViewHost to be larger than the number of restored entries. | 994 // given RenderViewHost to be larger than the number of restored entries. |
996 // This is called in CreateRenderView before any navigations in the RenderView | 995 // This is called in CreateRenderView before any navigations in the RenderView |
997 // have begun, to prevent any races in updating RenderView::next_page_id. | 996 // have begun, to prevent any races in updating RenderView::next_page_id. |
998 void UpdateMaxPageIDIfNecessary(RenderViewHost* rvh); | 997 void UpdateMaxPageIDIfNecessary(RenderViewHost* rvh); |
999 | 998 |
1000 // Saves the given title to the navigation entry and does associated work. It | |
1001 // will update history and the view for the new title, and also synthesize | |
1002 // titles for file URLs that have none (so we require that the URL of the | |
1003 // entry already be set). | |
1004 // | |
1005 // This is used as the backend for state updates, which include a new title, | |
1006 // or the dedicated set title message. It returns true if the new title is | |
1007 // different and was therefore updated. | |
1008 bool UpdateTitleForEntry(NavigationEntryImpl* entry, | |
1009 const base::string16& title); | |
1010 | |
1011 // Helper for CreateNewWidget/CreateNewFullscreenWidget. | 999 // Helper for CreateNewWidget/CreateNewFullscreenWidget. |
1012 void CreateNewWidget(int32_t render_process_id, | 1000 void CreateNewWidget(int32_t render_process_id, |
1013 int32_t route_id, | 1001 int32_t route_id, |
1014 bool is_fullscreen, | 1002 bool is_fullscreen, |
1015 blink::WebPopupType popup_type); | 1003 blink::WebPopupType popup_type); |
1016 | 1004 |
1017 // Helper for ShowCreatedWidget/ShowCreatedFullscreenWidget. | 1005 // Helper for ShowCreatedWidget/ShowCreatedFullscreenWidget. |
1018 void ShowCreatedWidget(int process_id, | 1006 void ShowCreatedWidget(int process_id, |
1019 int route_id, | 1007 int route_id, |
1020 bool is_fullscreen, | 1008 bool is_fullscreen, |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1432 // Adds/removes a callback called on creation of each new WebContents. | 1420 // Adds/removes a callback called on creation of each new WebContents. |
1433 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1421 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1434 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1422 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1435 | 1423 |
1436 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1424 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1437 }; | 1425 }; |
1438 | 1426 |
1439 } // namespace content | 1427 } // namespace content |
1440 | 1428 |
1441 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1429 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |