Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Side by Side Diff: chrome/browser/ui/webui/version_ui.cc

Issue 1459793002: Android: Allow compiling browser without Java UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/version_ui.h" 5 #include "chrome/browser/ui/webui/version_ui.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/webui/version_handler.h" 10 #include "chrome/browser/ui/webui/version_handler.h"
(...skipping 13 matching lines...) Expand all
24 #include "grit/components_google_chrome_strings.h" 24 #include "grit/components_google_chrome_strings.h"
25 #include "grit/components_resources.h" 25 #include "grit/components_resources.h"
26 #include "grit/components_strings.h" 26 #include "grit/components_strings.h"
27 #include "ui/base/l10n/l10n_util.h" 27 #include "ui/base/l10n/l10n_util.h"
28 #include "v8/include/v8.h" 28 #include "v8/include/v8.h"
29 29
30 #if defined(ENABLE_THEMES) 30 #if defined(ENABLE_THEMES)
31 #include "chrome/browser/ui/webui/theme_source.h" 31 #include "chrome/browser/ui/webui/theme_source.h"
32 #endif 32 #endif
33 33
34 #if defined(OS_ANDROID) 34 #if defined(ANDROID_JAVA_UI)
35 #include "base/android/build_info.h" 35 #include "base/android/build_info.h"
36 #include "chrome/browser/ui/android/android_about_app_info.h" 36 #include "chrome/browser/ui/android/android_about_app_info.h"
37 #endif 37 #endif
38 38
39 #if defined(OS_CHROMEOS) 39 #if defined(OS_CHROMEOS)
40 #include "chrome/browser/ui/webui/version_handler_chromeos.h" 40 #include "chrome/browser/ui/webui/version_handler_chromeos.h"
41 #endif 41 #endif
42 42
43 using content::WebUIDataSource; 43 using content::WebUIDataSource;
44 44
(...skipping 12 matching lines...) Expand all
57 html_source->AddString(version_ui::kVersionModifier, 57 html_source->AddString(version_ui::kVersionModifier,
58 chrome::GetChannelString()); 58 chrome::GetChannelString());
59 html_source->AddLocalizedString(version_ui::kOSName, IDS_VERSION_UI_OS); 59 html_source->AddLocalizedString(version_ui::kOSName, IDS_VERSION_UI_OS);
60 html_source->AddLocalizedString(version_ui::kPlatform, IDS_PLATFORM_LABEL); 60 html_source->AddLocalizedString(version_ui::kPlatform, IDS_PLATFORM_LABEL);
61 html_source->AddString(version_ui::kOSType, version_info::GetOSType()); 61 html_source->AddString(version_ui::kOSType, version_info::GetOSType());
62 html_source->AddString(version_ui::kBlinkVersion, 62 html_source->AddString(version_ui::kBlinkVersion,
63 content::GetWebKitVersion()); 63 content::GetWebKitVersion());
64 html_source->AddString(version_ui::kJSEngine, "V8"); 64 html_source->AddString(version_ui::kJSEngine, "V8");
65 html_source->AddString(version_ui::kJSVersion, v8::V8::GetVersion()); 65 html_source->AddString(version_ui::kJSVersion, v8::V8::GetVersion());
66 66
67 #if defined(OS_ANDROID) 67 #if defined(ANDROID_JAVA_UI)
68 html_source->AddString(version_ui::kOSVersion, 68 html_source->AddString(version_ui::kOSVersion,
69 AndroidAboutAppInfo::GetOsInfo()); 69 AndroidAboutAppInfo::GetOsInfo());
Ted C 2015/11/30 19:39:05 will want this to be OS_ANDROID at least
no sievers 2015/11/30 23:56:34 Done. I reverted all changes to this file.
70 html_source->AddLocalizedString(version_ui::kBuildIDName, 70 html_source->AddLocalizedString(version_ui::kBuildIDName,
71 IDS_VERSION_UI_BUILD_ID); 71 IDS_VERSION_UI_BUILD_ID);
72 html_source->AddString(version_ui::kBuildID, CHROME_BUILD_ID); 72 html_source->AddString(version_ui::kBuildID, CHROME_BUILD_ID);
73 #else 73 #else
74 html_source->AddString(version_ui::kOSVersion, std::string()); 74 html_source->AddString(version_ui::kOSVersion, std::string());
75 html_source->AddString(version_ui::kFlashPlugin, "Flash"); 75 html_source->AddString(version_ui::kFlashPlugin, "Flash");
76 // Note that the Flash version is retrieve asynchronously and returned in 76 // Note that the Flash version is retrieve asynchronously and returned in
77 // VersionHandler::OnGotPlugins. The area is initially blank. 77 // VersionHandler::OnGotPlugins. The area is initially blank.
78 html_source->AddString(version_ui::kFlashVersion, std::string()); 78 html_source->AddString(version_ui::kFlashVersion, std::string());
79 #endif // defined(OS_ANDROID) 79 #endif // defined(ANDROID_JAVA_UI)
80 80
81 html_source->AddLocalizedString(version_ui::kCompany, 81 html_source->AddLocalizedString(version_ui::kCompany,
82 IDS_ABOUT_VERSION_COMPANY_NAME); 82 IDS_ABOUT_VERSION_COMPANY_NAME);
83 base::Time::Exploded exploded_time; 83 base::Time::Exploded exploded_time;
84 base::Time::Now().LocalExplode(&exploded_time); 84 base::Time::Now().LocalExplode(&exploded_time);
85 html_source->AddString( 85 html_source->AddString(
86 version_ui::kCopyright, 86 version_ui::kCopyright,
87 l10n_util::GetStringFUTF16(IDS_ABOUT_VERSION_COPYRIGHT, 87 l10n_util::GetStringFUTF16(IDS_ABOUT_VERSION_COPYRIGHT,
88 base::IntToString16(exploded_time.year))); 88 base::IntToString16(exploded_time.year)));
89 html_source->AddLocalizedString(version_ui::kRevision, 89 html_source->AddLocalizedString(version_ui::kRevision,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // Set up the chrome://theme/ source. 167 // Set up the chrome://theme/ source.
168 ThemeSource* theme = new ThemeSource(profile); 168 ThemeSource* theme = new ThemeSource(profile);
169 content::URLDataSource::Add(profile, theme); 169 content::URLDataSource::Add(profile, theme);
170 #endif 170 #endif
171 171
172 WebUIDataSource::Add(profile, CreateVersionUIDataSource()); 172 WebUIDataSource::Add(profile, CreateVersionUIDataSource());
173 } 173 }
174 174
175 VersionUI::~VersionUI() { 175 VersionUI::~VersionUI() {
176 } 176 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698