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

Side by Side Diff: chrome/browser/history/history_tab_helper.h

Issue 2657323003: Convert HistoryTabHelper to use the new navigation callbacks. (Closed)
Patch Set: nit Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/history/history_tab_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROME_BROWSER_HISTORY_HISTORY_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_TAB_HELPER_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_TAB_HELPER_H_ 6 #define CHROME_BROWSER_HISTORY_HISTORY_TAB_HELPER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 17 matching lines...) Expand all
28 28
29 // Sends the page title to the history service. This is called when we receive 29 // Sends the page title to the history service. This is called when we receive
30 // the page title and we know we want to update history. 30 // the page title and we know we want to update history.
31 void UpdateHistoryPageTitle(const content::NavigationEntry& entry); 31 void UpdateHistoryPageTitle(const content::NavigationEntry& entry);
32 32
33 // Returns the history::HistoryAddPageArgs to use for adding a page to 33 // Returns the history::HistoryAddPageArgs to use for adding a page to
34 // history. 34 // history.
35 history::HistoryAddPageArgs CreateHistoryAddPageArgs( 35 history::HistoryAddPageArgs CreateHistoryAddPageArgs(
36 const GURL& virtual_url, 36 const GURL& virtual_url,
37 base::Time timestamp, 37 base::Time timestamp,
38 bool did_replace_entry,
39 int nav_entry_id, 38 int nav_entry_id,
40 const content::FrameNavigateParams& params); 39 content::NavigationHandle* navigation_handle);
41 40
42 private: 41 private:
43 explicit HistoryTabHelper(content::WebContents* web_contents); 42 explicit HistoryTabHelper(content::WebContents* web_contents);
44 friend class content::WebContentsUserData<HistoryTabHelper>; 43 friend class content::WebContentsUserData<HistoryTabHelper>;
45 44
46 // content::WebContentsObserver implementation. 45 // content::WebContentsObserver implementation.
47 void DidNavigateMainFrame( 46 void DidFinishNavigation(
48 const content::LoadCommittedDetails& details, 47 content::NavigationHandle* navigation_handle) override;
49 const content::FrameNavigateParams& params) override;
50 void DidNavigateAnyFrame(content::RenderFrameHost* render_frame_host,
51 const content::LoadCommittedDetails& details,
52 const content::FrameNavigateParams& params) override;
53 void TitleWasSet(content::NavigationEntry* entry, bool explicit_set) override; 48 void TitleWasSet(content::NavigationEntry* entry, bool explicit_set) override;
54 void WebContentsDestroyed() override; 49 void WebContentsDestroyed() override;
55 50
56 // Helper function to return the history service. May return NULL. 51 // Helper function to return the history service. May return NULL.
57 history::HistoryService* GetHistoryService(); 52 history::HistoryService* GetHistoryService();
58 53
59 // Whether we have a (non-empty) title for the current page. 54 // Whether we have a (non-empty) title for the current page.
60 // Used to prevent subsequent title updates from affecting history. This 55 // Used to prevent subsequent title updates from affecting history. This
61 // prevents some weirdness because some AJAXy apps use titles for status 56 // prevents some weirdness because some AJAXy apps use titles for status
62 // messages. 57 // messages.
63 bool received_page_title_; 58 bool received_page_title_;
64 59
65 DISALLOW_COPY_AND_ASSIGN(HistoryTabHelper); 60 DISALLOW_COPY_AND_ASSIGN(HistoryTabHelper);
66 }; 61 };
67 62
68 #endif // CHROME_BROWSER_HISTORY_HISTORY_TAB_HELPER_H_ 63 #endif // CHROME_BROWSER_HISTORY_HISTORY_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/history/history_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698