Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: chrome/browser/extensions/api/top_sites/top_sites_api.h

Issue 11522007: Move TopSites api from c/b/history to c/b/e/api (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_ungoop_history
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/top_sites/top_sites_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_EXTENSIONS_API_TOP_SITES_TOP_SITES_API_H_
6 #define CHROME_BROWSER_HISTORY_TOP_SITES_EXTENSION_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_TOP_SITES_TOP_SITES_API_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.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 namespace extensions {
13
12 class GetTopSitesFunction : public AsyncExtensionFunction { 14 class GetTopSitesFunction : public AsyncExtensionFunction {
13 public: 15 public:
14 DECLARE_EXTENSION_FUNCTION_NAME("topSites.get") 16 DECLARE_EXTENSION_FUNCTION_NAME("topSites.get")
15 17
16 GetTopSitesFunction(); 18 GetTopSitesFunction();
17 19
18 protected: 20 protected:
19 virtual ~GetTopSitesFunction(); 21 virtual ~GetTopSitesFunction();
20 22
21 // ExtensionFunction: 23 // ExtensionFunction:
22 virtual bool RunImpl() OVERRIDE; 24 virtual bool RunImpl() OVERRIDE;
23 25
24 private: 26 private:
25 void OnMostVisitedURLsAvailable(const history::MostVisitedURLList& data); 27 void OnMostVisitedURLsAvailable(const history::MostVisitedURLList& data);
26 28
27 // For callbacks may be run after destruction. 29 // For callbacks may be run after destruction.
28 base::WeakPtrFactory<GetTopSitesFunction> weak_ptr_factory_; 30 base::WeakPtrFactory<GetTopSitesFunction> weak_ptr_factory_;
29 }; 31 };
30 32
31 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_EXTENSION_API_H_ 33 } // namespace extensions
34
35 #endif // CHROME_BROWSER_EXTENSIONS_API_TOP_SITES_TOP_SITES_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/top_sites/top_sites_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698