| 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/theme_handler.h" | 5 #include "chrome/browser/ui/webui/theme_handler.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/themes/theme_service.h" | 10 #include "chrome/browser/themes/theme_service.h" |
| 10 #include "chrome/browser/themes/theme_service_factory.h" | 11 #include "chrome/browser/themes/theme_service_factory.h" |
| 11 #include "chrome/browser/ui/webui/theme_source.h" | 12 #include "chrome/browser/ui/webui/theme_source.h" |
| 12 #include "chrome/common/chrome_notification_types.h" | |
| 13 #include "content/public/browser/notification_service.h" | 13 #include "content/public/browser/notification_service.h" |
| 14 #include "content/public/browser/web_ui.h" | 14 #include "content/public/browser/web_ui.h" |
| 15 #include "grit/theme_resources.h" | 15 #include "grit/theme_resources.h" |
| 16 | 16 |
| 17 /////////////////////////////////////////////////////////////////////////////// | 17 /////////////////////////////////////////////////////////////////////////////// |
| 18 // ThemeHandler | 18 // ThemeHandler |
| 19 | 19 |
| 20 ThemeHandler::ThemeHandler() { | 20 ThemeHandler::ThemeHandler() { |
| 21 } | 21 } |
| 22 | 22 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 47 | 47 |
| 48 void ThemeHandler::InitializeCSSCaches() { | 48 void ThemeHandler::InitializeCSSCaches() { |
| 49 Profile* profile = GetProfile(); | 49 Profile* profile = GetProfile(); |
| 50 ThemeSource* theme = new ThemeSource(profile); | 50 ThemeSource* theme = new ThemeSource(profile); |
| 51 content::URLDataSource::Add(profile, theme); | 51 content::URLDataSource::Add(profile, theme); |
| 52 } | 52 } |
| 53 | 53 |
| 54 Profile* ThemeHandler::GetProfile() const { | 54 Profile* ThemeHandler::GetProfile() const { |
| 55 return Profile::FromWebUI(web_ui()); | 55 return Profile::FromWebUI(web_ui()); |
| 56 } | 56 } |
| OLD | NEW |