| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/app_launcher_page_ui.h" | 5 #include "chrome/browser/ui/webui/app_launcher_page_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/ref_counted_memory.h" | 9 #include "base/memory/ref_counted_memory.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 web_ui->AddMessageHandler(new MetricsHandler()); | 52 web_ui->AddMessageHandler(new MetricsHandler()); |
| 53 } | 53 } |
| 54 | 54 |
| 55 #if defined(ENABLE_THEMES) | 55 #if defined(ENABLE_THEMES) |
| 56 // The theme handler can require some CPU, so do it after hooking up the most | 56 // The theme handler can require some CPU, so do it after hooking up the most |
| 57 // visited handler. This allows the DB query for the new tab thumbs to happen | 57 // visited handler. This allows the DB query for the new tab thumbs to happen |
| 58 // earlier. | 58 // earlier. |
| 59 web_ui->AddMessageHandler(new ThemeHandler()); | 59 web_ui->AddMessageHandler(new ThemeHandler()); |
| 60 #endif | 60 #endif |
| 61 | 61 |
| 62 scoped_ptr<HTMLSource> html_source( | 62 std::unique_ptr<HTMLSource> html_source( |
| 63 new HTMLSource(GetProfile()->GetOriginalProfile())); | 63 new HTMLSource(GetProfile()->GetOriginalProfile())); |
| 64 content::URLDataSource::Add(GetProfile(), html_source.release()); | 64 content::URLDataSource::Add(GetProfile(), html_source.release()); |
| 65 } | 65 } |
| 66 | 66 |
| 67 AppLauncherPageUI::~AppLauncherPageUI() { | 67 AppLauncherPageUI::~AppLauncherPageUI() { |
| 68 } | 68 } |
| 69 | 69 |
| 70 // static | 70 // static |
| 71 base::RefCountedMemory* AppLauncherPageUI::GetFaviconResourceBytes( | 71 base::RefCountedMemory* AppLauncherPageUI::GetFaviconResourceBytes( |
| 72 ui::ScaleFactor scale_factor) { | 72 ui::ScaleFactor scale_factor) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 bool AppLauncherPageUI::HTMLSource::ShouldReplaceExistingSource() const { | 130 bool AppLauncherPageUI::HTMLSource::ShouldReplaceExistingSource() const { |
| 131 return false; | 131 return false; |
| 132 } | 132 } |
| 133 | 133 |
| 134 bool AppLauncherPageUI::HTMLSource::ShouldAddContentSecurityPolicy() const { | 134 bool AppLauncherPageUI::HTMLSource::ShouldAddContentSecurityPolicy() const { |
| 135 return false; | 135 return false; |
| 136 } | 136 } |
| 137 | 137 |
| 138 AppLauncherPageUI::HTMLSource::~HTMLSource() {} | 138 AppLauncherPageUI::HTMLSource::~HTMLSource() {} |
| OLD | NEW |