Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: content/browser/web_contents/web_contents_impl.h

Issue 2086423005: Using WebContents::UpdateTitleForEntry() instead of NavigationEntry::SetTitle() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 797 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
796 TwoSubframesCreatePopupMenuWidgetsSimultaneously); 798 TwoSubframesCreatePopupMenuWidgetsSimultaneously);
797 FRIEND_TEST_ALL_PREFIXES(SitePerProcessAccessibilityBrowserTest, 799 FRIEND_TEST_ALL_PREFIXES(SitePerProcessAccessibilityBrowserTest,
798 CrossSiteIframeAccessibility); 800 CrossSiteIframeAccessibility);
799 FRIEND_TEST_ALL_PREFIXES(WebContentsImplBrowserTest, 801 FRIEND_TEST_ALL_PREFIXES(WebContentsImplBrowserTest,
800 JavaScriptDialogsInMainAndSubframes); 802 JavaScriptDialogsInMainAndSubframes);
801 803
802 // So |find_request_manager_| can be accessed for testing. 804 // So |find_request_manager_| can be accessed for testing.
803 friend class FindRequestManagerTest; 805 friend class FindRequestManagerTest;
804 806
805 // So InterstitialPageImpl can access SetIsLoading.
806 friend class InterstitialPageImpl;
807
808 // TODO(brettw) TestWebContents shouldn't exist! 807 // TODO(brettw) TestWebContents shouldn't exist!
809 friend class TestWebContents; 808 friend class TestWebContents;
810 809
811 class DestructionObserver; 810 class DestructionObserver;
812 811
813 // Represents a WebContents node in a tree of WebContents structure. 812 // Represents a WebContents node in a tree of WebContents structure.
814 // 813 //
815 // Two WebContents with separate FrameTrees can be connected by 814 // Two WebContents with separate FrameTrees can be connected by
816 // outer/inner relationship using this class. Note that their FrameTrees 815 // outer/inner relationship using this class. Note that their FrameTrees
817 // still remain disjoint. 816 // still remain disjoint.
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 // committed to the navigation controller. Note that the navigation entry is 988 // committed to the navigation controller. Note that the navigation entry is
990 // not provided since it may be invalid/changed after being committed. The 989 // not provided since it may be invalid/changed after being committed. The
991 // current navigation entry is in the NavigationController at this point. 990 // current navigation entry is in the NavigationController at this point.
992 991
993 // If our controller was restored, update the max page ID associated with the 992 // If our controller was restored, update the max page ID associated with the
994 // given RenderViewHost to be larger than the number of restored entries. 993 // given RenderViewHost to be larger than the number of restored entries.
995 // This is called in CreateRenderView before any navigations in the RenderView 994 // This is called in CreateRenderView before any navigations in the RenderView
996 // have begun, to prevent any races in updating RenderView::next_page_id. 995 // have begun, to prevent any races in updating RenderView::next_page_id.
997 void UpdateMaxPageIDIfNecessary(RenderViewHost* rvh); 996 void UpdateMaxPageIDIfNecessary(RenderViewHost* rvh);
998 997
999 // Saves the given title to the navigation entry and does associated work. It
1000 // will update history and the view for the new title, and also synthesize
1001 // titles for file URLs that have none (so we require that the URL of the
1002 // entry already be set).
1003 //
1004 // This is used as the backend for state updates, which include a new title,
1005 // or the dedicated set title message. It returns true if the new title is
1006 // different and was therefore updated.
1007 bool UpdateTitleForEntry(NavigationEntryImpl* entry,
1008 const base::string16& title);
1009
1010 // Helper for CreateNewWidget/CreateNewFullscreenWidget. 998 // Helper for CreateNewWidget/CreateNewFullscreenWidget.
1011 void CreateNewWidget(int32_t render_process_id, 999 void CreateNewWidget(int32_t render_process_id,
1012 int32_t route_id, 1000 int32_t route_id,
1013 bool is_fullscreen, 1001 bool is_fullscreen,
1014 blink::WebPopupType popup_type); 1002 blink::WebPopupType popup_type);
1015 1003
1016 // Helper for ShowCreatedWidget/ShowCreatedFullscreenWidget. 1004 // Helper for ShowCreatedWidget/ShowCreatedFullscreenWidget.
1017 void ShowCreatedWidget(int process_id, 1005 void ShowCreatedWidget(int process_id,
1018 int route_id, 1006 int route_id,
1019 bool is_fullscreen, 1007 bool is_fullscreen,
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 // Adds/removes a callback called on creation of each new WebContents. 1419 // Adds/removes a callback called on creation of each new WebContents.
1432 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1420 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1433 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1421 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1434 1422
1435 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1423 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1436 }; 1424 };
1437 1425
1438 } // namespace content 1426 } // namespace content
1439 1427
1440 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1428 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698