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/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
10 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
11 #include "content/public/browser/web_ui.h" | 12 #include "content/public/browser/web_ui.h" |
12 #include "grit/theme_resources.h" | 13 #include "grit/theme_resources.h" |
13 #include "ui/base/resource/resource_bundle.h" | 14 #include "ui/base/resource/resource_bundle.h" |
14 | 15 |
15 //////////////////////////////////////////////////////////////////////////////// | 16 //////////////////////////////////////////////////////////////////////////////// |
16 // | 17 // |
17 // BookmarksUIHTMLSource | 18 // BookmarksUIHTMLSource |
18 // | 19 // |
19 //////////////////////////////////////////////////////////////////////////////// | 20 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 Profile* profile = Profile::FromWebUI(web_ui); | 57 Profile* profile = Profile::FromWebUI(web_ui); |
57 ChromeURLDataManager::AddDataSource(profile, html_source); | 58 ChromeURLDataManager::AddDataSource(profile, html_source); |
58 } | 59 } |
59 | 60 |
60 // static | 61 // static |
61 base::RefCountedMemory* BookmarksUI::GetFaviconResourceBytes( | 62 base::RefCountedMemory* BookmarksUI::GetFaviconResourceBytes( |
62 ui::ScaleFactor scale_factor) { | 63 ui::ScaleFactor scale_factor) { |
63 return ui::ResourceBundle::GetSharedInstance(). | 64 return ui::ResourceBundle::GetSharedInstance(). |
64 LoadDataResourceBytesForScale(IDR_BOOKMARKS_FAVICON, scale_factor); | 65 LoadDataResourceBytesForScale(IDR_BOOKMARKS_FAVICON, scale_factor); |
65 } | 66 } |
OLD | NEW |