| OLD | NEW |
| 1 // Copyright (c) 2012 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_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 | 7 |
| 8 #include "chrome/browser/cancelable_request.h" | 8 #include "chrome/browser/common/cancelable_request.h" |
| 9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
| 10 #include "chrome/browser/history/history_types.h" | 10 #include "chrome/browser/history/history_types.h" |
| 11 | 11 |
| 12 class GetTopSitesFunction : public AsyncExtensionFunction { | 12 class GetTopSitesFunction : public AsyncExtensionFunction { |
| 13 public: | 13 public: |
| 14 DECLARE_EXTENSION_FUNCTION_NAME("topSites.get") | 14 DECLARE_EXTENSION_FUNCTION_NAME("topSites.get") |
| 15 | 15 |
| 16 GetTopSitesFunction(); | 16 GetTopSitesFunction(); |
| 17 | 17 |
| 18 protected: | 18 protected: |
| 19 virtual ~GetTopSitesFunction(); | 19 virtual ~GetTopSitesFunction(); |
| 20 | 20 |
| 21 // ExtensionFunction: | 21 // ExtensionFunction: |
| 22 virtual bool RunImpl() OVERRIDE; | 22 virtual bool RunImpl() OVERRIDE; |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 void OnMostVisitedURLsAvailable( | 25 void OnMostVisitedURLsAvailable( |
| 26 const history::MostVisitedURLList& data); | 26 const history::MostVisitedURLList& data); |
| 27 | 27 |
| 28 CancelableRequestConsumer topsites_consumer_; | 28 CancelableRequestConsumer topsites_consumer_; |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_EXTENSION_API_H_ | 31 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_EXTENSION_API_H_ |
| OLD | NEW |