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_EXTENSIONS_API_HISTORY_HISTORY_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_HISTORY_HISTORY_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_HISTORY_HISTORY_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_HISTORY_HISTORY_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(HistoryEventRouter); | 54 DISALLOW_COPY_AND_ASSIGN(HistoryEventRouter); |
55 }; | 55 }; |
56 | 56 |
57 class HistoryAPI : public ProfileKeyedAPI, | 57 class HistoryAPI : public ProfileKeyedAPI, |
58 public EventRouter::Observer { | 58 public EventRouter::Observer { |
59 public: | 59 public: |
60 explicit HistoryAPI(Profile* profile); | 60 explicit HistoryAPI(Profile* profile); |
61 virtual ~HistoryAPI(); | 61 virtual ~HistoryAPI(); |
62 | 62 |
63 // ProfileKeyedService implementation. | 63 // BrowserContextKeyedService implementation. |
64 virtual void Shutdown() OVERRIDE; | 64 virtual void Shutdown() OVERRIDE; |
65 | 65 |
66 // ProfileKeyedAPI implementation. | 66 // ProfileKeyedAPI implementation. |
67 static ProfileKeyedAPIFactory<HistoryAPI>* GetFactoryInstance(); | 67 static ProfileKeyedAPIFactory<HistoryAPI>* GetFactoryInstance(); |
68 | 68 |
69 // EventRouter::Observer implementation. | 69 // EventRouter::Observer implementation. |
70 virtual void OnListenerAdded(const EventListenerInfo& details) OVERRIDE; | 70 virtual void OnListenerAdded(const EventListenerInfo& details) OVERRIDE; |
71 | 71 |
72 private: | 72 private: |
73 friend class ProfileKeyedAPIFactory<HistoryAPI>; | 73 friend class ProfileKeyedAPIFactory<HistoryAPI>; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // HistoryFunctionWithCallback: | 219 // HistoryFunctionWithCallback: |
220 virtual bool RunAsyncImpl() OVERRIDE; | 220 virtual bool RunAsyncImpl() OVERRIDE; |
221 | 221 |
222 // Callback for the history service to acknowledge deletion. | 222 // Callback for the history service to acknowledge deletion. |
223 void DeleteComplete(); | 223 void DeleteComplete(); |
224 }; | 224 }; |
225 | 225 |
226 } // namespace extensions | 226 } // namespace extensions |
227 | 227 |
228 #endif // CHROME_BROWSER_EXTENSIONS_API_HISTORY_HISTORY_API_H_ | 228 #endif // CHROME_BROWSER_EXTENSIONS_API_HISTORY_HISTORY_API_H_ |
OLD | NEW |