| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_EXTENSIONS_EXTENSION_HISTORY_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_HISTORY_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HISTORY_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HISTORY_API_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // CancelableRequestConsumerT require it to be accessed after the call. | 89 // CancelableRequestConsumerT require it to be accessed after the call. |
| 90 void SendResponseToCallback(); | 90 void SendResponseToCallback(); |
| 91 | 91 |
| 92 friend class NewRunnableMethod; | 92 friend class NewRunnableMethod; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 class GetVisitsHistoryFunction : public HistoryFunctionWithCallback { | 95 class GetVisitsHistoryFunction : public HistoryFunctionWithCallback { |
| 96 public: | 96 public: |
| 97 // Override HistoryFunction. | 97 // Override HistoryFunction. |
| 98 virtual bool RunAsyncImpl(); | 98 virtual bool RunAsyncImpl(); |
| 99 DECLARE_EXTENSION_FUNCTION_NAME("experimental.history.getVisits"); | 99 DECLARE_EXTENSION_FUNCTION_NAME("history.getVisits"); |
| 100 | 100 |
| 101 // Callback for the history function to provide results. | 101 // Callback for the history function to provide results. |
| 102 void QueryComplete(HistoryService::Handle request_service, | 102 void QueryComplete(HistoryService::Handle request_service, |
| 103 bool success, | 103 bool success, |
| 104 const history::URLRow* url_row, | 104 const history::URLRow* url_row, |
| 105 history::VisitVector* visits); | 105 history::VisitVector* visits); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 class SearchHistoryFunction : public HistoryFunctionWithCallback { | 108 class SearchHistoryFunction : public HistoryFunctionWithCallback { |
| 109 public: | 109 public: |
| 110 virtual bool RunAsyncImpl(); | 110 virtual bool RunAsyncImpl(); |
| 111 DECLARE_EXTENSION_FUNCTION_NAME("experimental.history.search"); | 111 DECLARE_EXTENSION_FUNCTION_NAME("history.search"); |
| 112 | 112 |
| 113 // Callback for the history function to provide results. | 113 // Callback for the history function to provide results. |
| 114 void SearchComplete(HistoryService::Handle request_handle, | 114 void SearchComplete(HistoryService::Handle request_handle, |
| 115 history::QueryResults* results); | 115 history::QueryResults* results); |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 class AddUrlHistoryFunction : public HistoryFunction { | 118 class AddUrlHistoryFunction : public HistoryFunction { |
| 119 public: | 119 public: |
| 120 virtual bool RunImpl(); | 120 virtual bool RunImpl(); |
| 121 DECLARE_EXTENSION_FUNCTION_NAME("experimental.history.addUrl"); | 121 DECLARE_EXTENSION_FUNCTION_NAME("history.addUrl"); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 class DeleteAllHistoryFunction : public HistoryFunctionWithCallback { | 124 class DeleteAllHistoryFunction : public HistoryFunctionWithCallback { |
| 125 public: | 125 public: |
| 126 virtual bool RunAsyncImpl(); | 126 virtual bool RunAsyncImpl(); |
| 127 DECLARE_EXTENSION_FUNCTION_NAME("experimental.history.deleteAll"); | 127 DECLARE_EXTENSION_FUNCTION_NAME("history.deleteAll"); |
| 128 | 128 |
| 129 // Callback for the history service to acknowledge deletion. | 129 // Callback for the history service to acknowledge deletion. |
| 130 void DeleteComplete(); | 130 void DeleteComplete(); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 | 133 |
| 134 class DeleteUrlHistoryFunction : public HistoryFunction { | 134 class DeleteUrlHistoryFunction : public HistoryFunction { |
| 135 public: | 135 public: |
| 136 virtual bool RunImpl(); | 136 virtual bool RunImpl(); |
| 137 DECLARE_EXTENSION_FUNCTION_NAME("experimental.history.deleteUrl"); | 137 DECLARE_EXTENSION_FUNCTION_NAME("history.deleteUrl"); |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 class DeleteRangeHistoryFunction : public HistoryFunctionWithCallback { | 140 class DeleteRangeHistoryFunction : public HistoryFunctionWithCallback { |
| 141 public: | 141 public: |
| 142 virtual bool RunAsyncImpl(); | 142 virtual bool RunAsyncImpl(); |
| 143 DECLARE_EXTENSION_FUNCTION_NAME("experimental.history.deleteRange"); | 143 DECLARE_EXTENSION_FUNCTION_NAME("history.deleteRange"); |
| 144 | 144 |
| 145 // Callback for the history service to acknowledge deletion. | 145 // Callback for the history service to acknowledge deletion. |
| 146 void DeleteComplete(); | 146 void DeleteComplete(); |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HISTORY_API_H_ | 149 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HISTORY_API_H_ |
| OLD | NEW |