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_HISTORY2_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_HISTORY2_UI_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_HISTORY2_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_HISTORY2_UI_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 public NotificationObserver { | 43 public NotificationObserver { |
44 public: | 44 public: |
45 BrowsingHistoryHandler2(); | 45 BrowsingHistoryHandler2(); |
46 virtual ~BrowsingHistoryHandler2(); | 46 virtual ~BrowsingHistoryHandler2(); |
47 | 47 |
48 // WebUIMessageHandler implementation. | 48 // WebUIMessageHandler implementation. |
49 virtual WebUIMessageHandler* Attach(WebUI* web_ui); | 49 virtual WebUIMessageHandler* Attach(WebUI* web_ui); |
50 virtual void RegisterMessages(); | 50 virtual void RegisterMessages(); |
51 | 51 |
52 // Callback for the "getHistory" message. | 52 // Callback for the "getHistory" message. |
53 void HandleGetHistory(const ListValue* args); | 53 void HandleGetHistory(const base::ListValue* args); |
54 | 54 |
55 // Callback for the "searchHistory" message. | 55 // Callback for the "searchHistory" message. |
56 void HandleSearchHistory(const ListValue* args); | 56 void HandleSearchHistory(const base::ListValue* args); |
57 | 57 |
58 // Callback for the "removeURLsOnOneDay" message. | 58 // Callback for the "removeURLsOnOneDay" message. |
59 void HandleRemoveURLsOnOneDay(const ListValue* args); | 59 void HandleRemoveURLsOnOneDay(const base::ListValue* args); |
60 | 60 |
61 // Handle for "clearBrowsingData" message. | 61 // Handle for "clearBrowsingData" message. |
62 void HandleClearBrowsingData(const ListValue* args); | 62 void HandleClearBrowsingData(const base::ListValue* args); |
63 | 63 |
64 // NotificationObserver implementation. | 64 // NotificationObserver implementation. |
65 virtual void Observe(int type, | 65 virtual void Observe(int type, |
66 const NotificationSource& source, | 66 const NotificationSource& source, |
67 const NotificationDetails& details); | 67 const NotificationDetails& details); |
68 | 68 |
69 private: | 69 private: |
70 // Callback from the history system when the history list is available. | 70 // Callback from the history system when the history list is available. |
71 void QueryComplete(HistoryService::Handle request_handle, | 71 void QueryComplete(HistoryService::Handle request_handle, |
72 history::QueryResults* results); | 72 history::QueryResults* results); |
73 | 73 |
74 // Callback from the history system when visits were deleted. | 74 // Callback from the history system when visits were deleted. |
75 void RemoveComplete(); | 75 void RemoveComplete(); |
76 | 76 |
77 // Extract the arguments from the call to HandleSearchHistory. | 77 // Extract the arguments from the call to HandleSearchHistory. |
78 void ExtractSearchHistoryArguments(const ListValue* args, | 78 void ExtractSearchHistoryArguments(const base::ListValue* args, |
79 int* month, | 79 int* month, |
80 string16* query); | 80 string16* query); |
81 | 81 |
82 // Figure out the query options for a month-wide query. | 82 // Figure out the query options for a month-wide query. |
83 history::QueryOptions CreateMonthQueryOptions(int month); | 83 history::QueryOptions CreateMonthQueryOptions(int month); |
84 | 84 |
85 NotificationRegistrar registrar_; | 85 NotificationRegistrar registrar_; |
86 | 86 |
87 // Current search text. | 87 // Current search text. |
88 string16 search_text_; | 88 string16 search_text_; |
(...skipping 14 matching lines...) Expand all Loading... |
103 // Return the URL for a given search term. | 103 // Return the URL for a given search term. |
104 static const GURL GetHistoryURLWithSearchText(const string16& text); | 104 static const GURL GetHistoryURLWithSearchText(const string16& text); |
105 | 105 |
106 static RefCountedMemory* GetFaviconResourceBytes(); | 106 static RefCountedMemory* GetFaviconResourceBytes(); |
107 | 107 |
108 private: | 108 private: |
109 DISALLOW_COPY_AND_ASSIGN(HistoryUI2); | 109 DISALLOW_COPY_AND_ASSIGN(HistoryUI2); |
110 }; | 110 }; |
111 | 111 |
112 #endif // CHROME_BROWSER_UI_WEBUI_HISTORY2_UI_H_ | 112 #endif // CHROME_BROWSER_UI_WEBUI_HISTORY2_UI_H_ |
OLD | NEW |