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/about_ui.h" | 5 #include "chrome/browser/ui/webui/about_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 #include "net/base/escape.h" | 63 #include "net/base/escape.h" |
64 #include "net/base/net_util.h" | 64 #include "net/base/net_util.h" |
65 #include "ui/base/l10n/l10n_util.h" | 65 #include "ui/base/l10n/l10n_util.h" |
66 #include "ui/base/layout.h" | 66 #include "ui/base/layout.h" |
67 #include "ui/base/resource/resource_bundle.h" | 67 #include "ui/base/resource/resource_bundle.h" |
68 #include "v8/include/v8.h" | 68 #include "v8/include/v8.h" |
69 #include "webkit/glue/user_agent.h" | 69 #include "webkit/glue/user_agent.h" |
70 #include "webkit/glue/webkit_glue.h" | 70 #include "webkit/glue/webkit_glue.h" |
71 #include "webkit/plugins/webplugininfo.h" | 71 #include "webkit/plugins/webplugininfo.h" |
72 | 72 |
| 73 #if defined(ENABLE_THEMES) |
| 74 #include "chrome/browser/ui/webui/theme_source.h" |
| 75 #endif |
| 76 |
73 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 77 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
74 #include "content/public/browser/zygote_host_linux.h" | 78 #include "content/public/browser/zygote_host_linux.h" |
75 #include "content/public/common/sandbox_linux.h" | 79 #include "content/public/common/sandbox_linux.h" |
76 #endif | 80 #endif |
77 | 81 |
78 #if defined(OS_WIN) | 82 #if defined(OS_WIN) |
79 #include "chrome/browser/enumerate_modules_model_win.h" | 83 #include "chrome/browser/enumerate_modules_model_win.h" |
80 #endif | 84 #endif |
81 | 85 |
82 #if defined(OS_CHROMEOS) | 86 #if defined(OS_CHROMEOS) |
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 path == kVersionJsPath || | 1378 path == kVersionJsPath || |
1375 path == kMemoryJsPath) { | 1379 path == kMemoryJsPath) { |
1376 return "application/javascript"; | 1380 return "application/javascript"; |
1377 } | 1381 } |
1378 return "text/html"; | 1382 return "text/html"; |
1379 } | 1383 } |
1380 | 1384 |
1381 AboutUI::AboutUI(content::WebUI* web_ui, const std::string& name) | 1385 AboutUI::AboutUI(content::WebUI* web_ui, const std::string& name) |
1382 : WebUIController(web_ui) { | 1386 : WebUIController(web_ui) { |
1383 Profile* profile = Profile::FromWebUI(web_ui); | 1387 Profile* profile = Profile::FromWebUI(web_ui); |
| 1388 |
| 1389 #if defined(ENABLE_THEMES) |
| 1390 // Set up the chrome://theme/ source. |
| 1391 ThemeSource* theme = new ThemeSource(profile); |
| 1392 ChromeURLDataManager::AddDataSource(profile, theme); |
| 1393 #endif |
| 1394 |
1384 ChromeURLDataManager::DataSource* source = | 1395 ChromeURLDataManager::DataSource* source = |
1385 new AboutUIHTMLSource(name, profile); | 1396 new AboutUIHTMLSource(name, profile); |
1386 if (source) { | 1397 if (source) { |
1387 ChromeURLDataManager::AddDataSource(profile, source); | 1398 ChromeURLDataManager::AddDataSource(profile, source); |
1388 } | 1399 } |
1389 } | 1400 } |
OLD | NEW |