| 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_UI_WEBUI_HISTORY_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "chrome/browser/cancelable_request.h" | 12 #include "chrome/browser/cancelable_request.h" |
| 13 #include "chrome/browser/history/history.h" | 13 #include "chrome/browser/history/history.h" |
| 14 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 14 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| 15 #include "chrome/browser/ui/webui/chrome_web_ui.h" | 15 #include "chrome/browser/ui/webui/chrome_web_ui.h" |
| 16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
| 17 #include "content/public/browser/web_ui_message_handler.h" |
| 17 | 18 |
| 18 class GURL; | 19 class GURL; |
| 19 | 20 |
| 20 // The handler for Javascript messages related to the "history" view. | 21 // The handler for Javascript messages related to the "history" view. |
| 21 class BrowsingHistoryHandler : public WebUIMessageHandler, | 22 class BrowsingHistoryHandler : public content::WebUIMessageHandler, |
| 22 public content::NotificationObserver { | 23 public content::NotificationObserver { |
| 23 public: | 24 public: |
| 24 BrowsingHistoryHandler(); | 25 BrowsingHistoryHandler(); |
| 25 virtual ~BrowsingHistoryHandler(); | 26 virtual ~BrowsingHistoryHandler(); |
| 26 | 27 |
| 27 // WebUIMessageHandler implementation. | 28 // WebUIMessageHandler implementation. |
| 28 virtual void RegisterMessages() OVERRIDE; | 29 virtual void RegisterMessages() OVERRIDE; |
| 29 | 30 |
| 30 // Callback for the "getHistory" message. | 31 // Callback for the "getHistory" message. |
| 31 void HandleGetHistory(const base::ListValue* args); | 32 void HandleGetHistory(const base::ListValue* args); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // Return the URL for a given search term. | 85 // Return the URL for a given search term. |
| 85 static const GURL GetHistoryURLWithSearchText(const string16& text); | 86 static const GURL GetHistoryURLWithSearchText(const string16& text); |
| 86 | 87 |
| 87 static RefCountedMemory* GetFaviconResourceBytes(); | 88 static RefCountedMemory* GetFaviconResourceBytes(); |
| 88 | 89 |
| 89 private: | 90 private: |
| 90 DISALLOW_COPY_AND_ASSIGN(HistoryUI); | 91 DISALLOW_COPY_AND_ASSIGN(HistoryUI); |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 #endif // CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ | 94 #endif // CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_ |
| OLD | NEW |