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