| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "content/browser/tab_contents/tab_contents_observer.h" | 9 #include "content/browser/tab_contents/tab_contents_observer.h" |
| 10 #include "content/common/notification_observer.h" | 10 #include "content/common/notification_observer.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // TabContentsObserver implementation. | 44 // TabContentsObserver implementation. |
| 45 virtual bool OnMessageReceived(const IPC::Message& message); | 45 virtual bool OnMessageReceived(const IPC::Message& message); |
| 46 virtual void DidNavigateMainFramePostCommit( | 46 virtual void DidNavigateMainFramePostCommit( |
| 47 const content::LoadCommittedDetails& details, | 47 const content::LoadCommittedDetails& details, |
| 48 const ViewHostMsg_FrameNavigate_Params& params); | 48 const ViewHostMsg_FrameNavigate_Params& params); |
| 49 virtual void DidNavigateAnyFramePostCommit( | 49 virtual void DidNavigateAnyFramePostCommit( |
| 50 const content::LoadCommittedDetails& details, | 50 const content::LoadCommittedDetails& details, |
| 51 const ViewHostMsg_FrameNavigate_Params& params); | 51 const ViewHostMsg_FrameNavigate_Params& params); |
| 52 | 52 |
| 53 // NotificationObserver implementation. | 53 // NotificationObserver implementation. |
| 54 virtual void Observe(NotificationType type, | 54 virtual void Observe(int type, |
| 55 const NotificationSource& source, | 55 const NotificationSource& source, |
| 56 const NotificationDetails& details); | 56 const NotificationDetails& details); |
| 57 | 57 |
| 58 void OnPageContents(const GURL& url, | 58 void OnPageContents(const GURL& url, |
| 59 int32 page_id, | 59 int32 page_id, |
| 60 const string16& contents); | 60 const string16& contents); |
| 61 void OnThumbnail(const GURL& url, | 61 void OnThumbnail(const GURL& url, |
| 62 const ThumbnailScore& score, | 62 const ThumbnailScore& score, |
| 63 const SkBitmap& bitmap); | 63 const SkBitmap& bitmap); |
| 64 | 64 |
| 65 // Helper function to return the history service. May return NULL. | 65 // Helper function to return the history service. May return NULL. |
| 66 HistoryService* GetHistoryService(); | 66 HistoryService* GetHistoryService(); |
| 67 | 67 |
| 68 // Whether we have a (non-empty) title for the current page. | 68 // Whether we have a (non-empty) title for the current page. |
| 69 // Used to prevent subsequent title updates from affecting history. This | 69 // Used to prevent subsequent title updates from affecting history. This |
| 70 // prevents some weirdness because some AJAXy apps use titles for status | 70 // prevents some weirdness because some AJAXy apps use titles for status |
| 71 // messages. | 71 // messages. |
| 72 bool received_page_title_; | 72 bool received_page_title_; |
| 73 | 73 |
| 74 NotificationRegistrar registrar_; | 74 NotificationRegistrar registrar_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(HistoryTabHelper); | 76 DISALLOW_COPY_AND_ASSIGN(HistoryTabHelper); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 #endif // CHROME_BROWSER_HISTORY_HISTORY_TAB_HELPER_H_ | 79 #endif // CHROME_BROWSER_HISTORY_HISTORY_TAB_HELPER_H_ |
| OLD | NEW |