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_TOP_SITES_EXTENSION_API_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_TOP_SITES_EXTENSION_API_H_ |
6 #define CHROME_BROWSER_HISTORY_TOP_SITES_EXTENSION_API_H_ | 6 #define CHROME_BROWSER_HISTORY_TOP_SITES_EXTENSION_API_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/cancelable_request.h" | 9 #include "chrome/browser/cancelable_request.h" |
10 #include "chrome/browser/extensions/extension_function.h" | 10 #include "chrome/browser/extensions/extension_function.h" |
11 #include "chrome/browser/history/history_types.h" | 11 #include "chrome/browser/history/history_types.h" |
12 | 12 |
13 class GetTopSitesFunction : public AsyncExtensionFunction { | 13 class GetTopSitesFunction : public AsyncExtensionFunction { |
14 public: | 14 public: |
15 GetTopSitesFunction(); | 15 GetTopSitesFunction(); |
16 virtual ~GetTopSitesFunction(); | 16 virtual ~GetTopSitesFunction(); |
17 virtual bool RunImpl() OVERRIDE; | 17 virtual bool RunImpl() OVERRIDE; |
18 DECLARE_EXTENSION_FUNCTION_NAME("experimental.topSites.get") | 18 DECLARE_EXTENSION_FUNCTION_NAME("topSites.get") |
19 | 19 |
20 private: | 20 private: |
21 void OnMostVisitedURLsAvailable( | 21 void OnMostVisitedURLsAvailable( |
22 const history::MostVisitedURLList& data); | 22 const history::MostVisitedURLList& data); |
23 | 23 |
24 CancelableRequestConsumer topsites_consumer_; | 24 CancelableRequestConsumer topsites_consumer_; |
25 }; | 25 }; |
26 | 26 |
27 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_EXTENSION_API_H_ | 27 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_EXTENSION_API_H_ |
OLD | NEW |