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 #include "chrome/browser/ui/webui/bookmarks_ui.h" | 5 #include "chrome/browser/ui/webui/bookmarks_ui.h" |
6 | 6 |
7 #include "base/memory/ref_counted_memory.h" | 7 #include "base/memory/ref_counted_memory.h" |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 //////////////////////////////////////////////////////////////////////////////// | 29 //////////////////////////////////////////////////////////////////////////////// |
30 // | 30 // |
31 // BookmarksUIHTMLSource | 31 // BookmarksUIHTMLSource |
32 // | 32 // |
33 //////////////////////////////////////////////////////////////////////////////// | 33 //////////////////////////////////////////////////////////////////////////////// |
34 | 34 |
35 BookmarksUIHTMLSource::BookmarksUIHTMLSource() | 35 BookmarksUIHTMLSource::BookmarksUIHTMLSource() |
36 : DataSource(chrome::kChromeUIBookmarksHost, MessageLoop::current()) { | 36 : DataSource(chrome::kChromeUIBookmarksHost, MessageLoop::current()) { |
37 } | 37 } |
38 | 38 |
| 39 BookmarksUIHTMLSource::~BookmarksUIHTMLSource() {} |
| 40 |
39 void BookmarksUIHTMLSource::StartDataRequest(const std::string& path, | 41 void BookmarksUIHTMLSource::StartDataRequest(const std::string& path, |
40 bool is_incognito, | 42 bool is_incognito, |
41 int request_id) { | 43 int request_id) { |
42 NOTREACHED() << "We should never get here since the extension should have" | 44 NOTREACHED() << "We should never get here since the extension should have" |
43 << "been triggered"; | 45 << "been triggered"; |
44 | 46 |
45 SendResponse(request_id, NULL); | 47 SendResponse(request_id, NULL); |
46 } | 48 } |
47 | 49 |
48 std::string BookmarksUIHTMLSource::GetMimeType(const std::string& path) const { | 50 std::string BookmarksUIHTMLSource::GetMimeType(const std::string& path) const { |
(...skipping 14 matching lines...) Expand all Loading... |
63 // Set up the chrome://bookmarks/ source. | 65 // Set up the chrome://bookmarks/ source. |
64 Profile* profile = Profile::FromWebUI(web_ui); | 66 Profile* profile = Profile::FromWebUI(web_ui); |
65 profile->GetChromeURLDataManager()->AddDataSource(html_source); | 67 profile->GetChromeURLDataManager()->AddDataSource(html_source); |
66 } | 68 } |
67 | 69 |
68 // static | 70 // static |
69 RefCountedMemory* BookmarksUI::GetFaviconResourceBytes() { | 71 RefCountedMemory* BookmarksUI::GetFaviconResourceBytes() { |
70 return ResourceBundle::GetSharedInstance(). | 72 return ResourceBundle::GetSharedInstance(). |
71 LoadDataResourceBytes(IDR_BOOKMARKS_FAVICON); | 73 LoadDataResourceBytes(IDR_BOOKMARKS_FAVICON); |
72 } | 74 } |
OLD | NEW |