OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_ |
| 6 #define CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "components/history/core/browser/history_client.h" |
| 11 #include "components/keyed_service/core/keyed_service.h" |
| 12 |
| 13 class Profile; |
| 14 class BookmarkModel; |
| 15 class HistoryService; |
| 16 |
| 17 namespace history { |
| 18 |
| 19 class ChromeHistoryClient : public HistoryClient, |
| 20 public KeyedService { |
| 21 public: |
| 22 explicit ChromeHistoryClient(Profile* profile); |
| 23 |
| 24 HistoryService* history_service() const { |
| 25 return history_service_.get(); |
| 26 } |
| 27 |
| 28 // HistoryClient: |
| 29 virtual void BlockTillBookmarksLoaded() OVERRIDE; |
| 30 virtual bool IsBookmarked(const GURL& url) OVERRIDE; |
| 31 virtual void GetBookmarks(std::vector<URLAndTitle>* bookmarks) OVERRIDE; |
| 32 |
| 33 // KeyedService: |
| 34 virtual void Shutdown() OVERRIDE; |
| 35 |
| 36 private: |
| 37 scoped_ptr<HistoryService> history_service_; |
| 38 BookmarkModel* bookmark_model_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(ChromeHistoryClient); |
| 41 }; |
| 42 |
| 43 } // namespace history |
| 44 |
| 45 #endif // CHROME_BROWSER_HISTORY_CHROME_HISTORY_CLIENT_H_ |
OLD | NEW |