Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / extensions / api / top_sites / top_sites_api.h
blob21440a100becdecde83f7da911713aaea1135075
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TOP_SITES_TOP_SITES_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_TOP_SITES_TOP_SITES_API_H_
8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/extensions/chrome_extension_function.h"
10 #include "chrome/browser/history/history_types.h"
12 namespace extensions {
14 class TopSitesGetFunction : public ChromeAsyncExtensionFunction {
15 public:
16 DECLARE_EXTENSION_FUNCTION("topSites.get", TOPSITES_GET)
18 TopSitesGetFunction();
20 protected:
21 virtual ~TopSitesGetFunction();
23 // ExtensionFunction:
24 virtual bool RunAsync() OVERRIDE;
26 private:
27 void OnMostVisitedURLsAvailable(const history::MostVisitedURLList& data);
29 // For callbacks may be run after destruction.
30 base::WeakPtrFactory<TopSitesGetFunction> weak_ptr_factory_;
33 } // namespace extensions
35 #endif // CHROME_BROWSER_EXTENSIONS_API_TOP_SITES_TOP_SITES_API_H_