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" |
11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
12 #include "chrome/browser/bookmarks/bookmark_editor.h" | 12 #include "chrome/browser/bookmarks/bookmark_editor.h" |
13 #include "chrome/browser/bookmarks/bookmark_model.h" | 13 #include "chrome/browser/bookmarks/bookmark_model.h" |
14 #include "chrome/browser/bookmarks/bookmark_utils.h" | 14 #include "chrome/browser/bookmarks/bookmark_utils.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/browser/ui/browser_list.h" | 17 #include "chrome/browser/ui/browser_list.h" |
18 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 18 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
19 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
20 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
21 #include "content/public/browser/web_ui.h" | 21 #include "content/public/browser/web_ui.h" |
| 22 #include "googleurl/src/gurl.h" |
22 #include "grit/theme_resources.h" | 23 #include "grit/theme_resources.h" |
23 #include "grit/theme_resources_standard.h" | 24 #include "grit/theme_resources_standard.h" |
| 25 #include "ui/base/layout.h" |
24 #include "ui/base/resource/resource_bundle.h" | 26 #include "ui/base/resource/resource_bundle.h" |
25 #include "googleurl/src/gurl.h" | |
26 | 27 |
27 using content::WebContents; | 28 using content::WebContents; |
28 | 29 |
29 //////////////////////////////////////////////////////////////////////////////// | 30 //////////////////////////////////////////////////////////////////////////////// |
30 // | 31 // |
31 // BookmarksUIHTMLSource | 32 // BookmarksUIHTMLSource |
32 // | 33 // |
33 //////////////////////////////////////////////////////////////////////////////// | 34 //////////////////////////////////////////////////////////////////////////////// |
34 | 35 |
35 BookmarksUIHTMLSource::BookmarksUIHTMLSource() | 36 BookmarksUIHTMLSource::BookmarksUIHTMLSource() |
(...skipping 27 matching lines...) Expand all Loading... |
63 BookmarksUIHTMLSource* html_source = new BookmarksUIHTMLSource(); | 64 BookmarksUIHTMLSource* html_source = new BookmarksUIHTMLSource(); |
64 | 65 |
65 // Set up the chrome://bookmarks/ source. | 66 // Set up the chrome://bookmarks/ source. |
66 Profile* profile = Profile::FromWebUI(web_ui); | 67 Profile* profile = Profile::FromWebUI(web_ui); |
67 ChromeURLDataManager::AddDataSource(profile, html_source); | 68 ChromeURLDataManager::AddDataSource(profile, html_source); |
68 } | 69 } |
69 | 70 |
70 // static | 71 // static |
71 base::RefCountedMemory* BookmarksUI::GetFaviconResourceBytes() { | 72 base::RefCountedMemory* BookmarksUI::GetFaviconResourceBytes() { |
72 return ResourceBundle::GetSharedInstance(). | 73 return ResourceBundle::GetSharedInstance(). |
73 LoadDataResourceBytes(IDR_BOOKMARKS_FAVICON); | 74 LoadDataResourceBytes(IDR_BOOKMARKS_FAVICON, |
| 75 ui::SCALE_FACTOR_100P); |
74 } | 76 } |
OLD | NEW |