Commit 91ede468 authored by tedchoc@chromium.org's avatar tedchoc@chromium.org

Adapt the linux about_memory page to better render on Android.

Updates kSyncAutoStarts in defaults.cc to match the android version as well.

BUG=138245
TEST=

Review URL: https://chromiumcodereview.appspot.com/10796054

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148637 0039d316-1c4b-4281-b951-d872f2087c98
parent f5460983
...@@ -641,6 +641,22 @@ Chromium is unable to recover your settings. ...@@ -641,6 +641,22 @@ Chromium is unable to recover your settings.
Chromium is no longer updating because your operating system is obsolete. Chromium is no longer updating because your operating system is obsolete.
</message> </message>
<!-- about:memory -->
<if expr="not pp_ifdef('android')">
<message name="IDS_MEMORY_USAGE_SUMMARY_DESC" desc="Describes the browser summary table in the about memory page, which shows memory usage for Chromium and any other active browsers." translateable="false">
Summary of memory used by currently active browsers. For browsers which use multiple processes, memory reflects aggregate memory used across all browser processes.
For Chromium, processes used to display diagnostics information (such as this "about:memory") are excluded.
</message>
</if>
<if expr="pp_ifdef('android')">
<message name="IDS_MEMORY_USAGE_SUMMARY_DESC" desc="Describes the browser summary table in the about memory page, which shows memory usage for Chromium." translateable="false">
Summary of memory used by Chromium. Since Chromium uses multiple processes, memory reflects aggregate memory used across all browser processes.
For Chromium, processes used to display diagnostics information (such as this "about:memory") are excluded.
</message>
</if>
<!-- About Chrome page --> <!-- About Chrome page -->
<if expr="not pp_ifdef('chromeos')"> <if expr="not pp_ifdef('chromeos')">
<message name="IDS_UPGRADE_SUCCESSFUL" desc="Status label: Successfully upgraded Chromium"> <message name="IDS_UPGRADE_SUCCESSFUL" desc="Status label: Successfully upgraded Chromium">
......
...@@ -565,6 +565,22 @@ Google Chrome is unable to recover your settings. ...@@ -565,6 +565,22 @@ Google Chrome is unable to recover your settings.
Google Chrome is no longer updating because your operating system is obsolete. Google Chrome is no longer updating because your operating system is obsolete.
</message> </message>
<!-- about:memory -->
<if expr="not pp_ifdef('android')">
<message name="IDS_MEMORY_USAGE_SUMMARY_DESC" desc="Describes the browser summary table in the about memory page, which shows memory usage for Google Chrome and any other active browsers." translateable="false">
Summary of memory used by currently active browsers. For browsers which use multiple processes, memory reflects aggregate memory used across all browser processes.
For Google Chrome, processes used to display diagnostics information (such as this "about:memory") are excluded.
</message>
</if>
<if expr="pp_ifdef('android')">
<message name="IDS_MEMORY_USAGE_SUMMARY_DESC" desc="Describes the browser summary table in the about memory page, which shows memory usage for Google Chrome." translateable="false">
Summary of memory used by Google Chrome. Since Google Chrome uses multiple processes, memory reflects aggregate memory used across all browser processes.
For Google Chrome, processes used to display diagnostics information (such as this "about:memory") are excluded.
</message>
</if>
<!-- About Chrome page --> <!-- About Chrome page -->
<if expr="not pp_ifdef('chromeos')"> <if expr="not pp_ifdef('chromeos')">
<message name="IDS_UPGRADE_SUCCESSFUL" desc="Status label: Successfully upgraded Google Chrome"> <message name="IDS_UPGRADE_SUCCESSFUL" desc="Status label: Successfully upgraded Google Chrome">
......
...@@ -79,8 +79,13 @@ const bool kShowHelpMenuItemIcon = false; ...@@ -79,8 +79,13 @@ const bool kShowHelpMenuItemIcon = false;
const bool kShowSyncSetupMenuItem = true; const bool kShowSyncSetupMenuItem = true;
const bool kShowUpgradeMenuItem = true; const bool kShowUpgradeMenuItem = true;
const bool kSizeTabButtonToTopOfTabStrip = false; const bool kSizeTabButtonToTopOfTabStrip = false;
#if defined(OS_ANDROID)
const bool kSyncAutoStarts = true;
const bool kShowOtherBrowsersInAboutMemory = false;
#else
const bool kSyncAutoStarts = false; const bool kSyncAutoStarts = false;
const bool kShowOtherBrowsersInAboutMemory = true; const bool kShowOtherBrowsersInAboutMemory = true;
#endif
const bool kAlwaysOpenIncognitoWindow = false; const bool kAlwaysOpenIncognitoWindow = false;
#endif #endif
......
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */
.summary-desc {
white-space: pre-line;
}
table.list#browserComparison tr:not([class*='firstRow']) > *:nth-child(1),
table.list#browserComparison tr:not([class*='firstRow']) > *:nth-child(4),
table.list#browserComparison tr.firstRow th:nth-child(1) {
border-right: 1px solid rgb(181, 198, 222);
}
table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(2),
table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(5),
table.list#memoryDetails tr.firstRow th:nth-child(2) {
border-right: 1px solid rgb(181, 198, 222);
}
<if expr="pp_ifdef('android')">
body {
min-width: 35em;
}
</if>
\ No newline at end of file
...@@ -6,32 +6,15 @@ about:memory template page ...@@ -6,32 +6,15 @@ about:memory template page
<html id="t"> <html id="t">
<head> <head>
<title>About Memory</title> <title>About Memory</title>
<if expr="pp_ifdef('android')">
<meta name="viewport" content="width=device-width"/>
</if>
<link rel="stylesheet" href="shared/css/about_memory.css"> <link rel="stylesheet" href="shared/css/about_memory.css">
<style> <link rel="stylesheet" href="about_memory_linux.css">
body { <script src="chrome://memory-redirect/memory.js"></script>
font-family: Arial, Helvetica, sans-serif; <script src="chrome://memory-redirect/strings.js"></script>
}
div#header select {
font-family: Arial, Helvetica, sans-serif;
}
div.otherbrowsers {
font-family: Arial, Helvetica, sans-serif;
}
table.list#browserComparison tr:not([class*='firstRow']) > *:nth-child(1),
table.list#browserComparison tr:not([class*='firstRow']) > *:nth-child(4),
table.list#browserComparison tr.firstRow th:nth-child(1) {
border-right: 1px solid #b5c6de;
}
table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(2),
table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(5),
table.list#memoryDetails tr.firstRow th:nth-child(2) {
border-right: 1px solid #b5c6de;
}
</style>
<script src="chrome://memory-redirect/memory.js"></script>
<script src="chrome://memory-redirect/strings.js"></script>
</head> </head>
<body> <body i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
<div id='header'> <div id='header'>
<h1> <h1>
About memory About memory
...@@ -46,13 +29,7 @@ table.list#memoryDetails tr.firstRow th:nth-child(2) { ...@@ -46,13 +29,7 @@ table.list#memoryDetails tr.firstRow th:nth-child(2) {
Summary Summary
<div class='help'> <div class='help'>
<div> <div>
<p> <p class='summary-desc' i18n-values=".innerHTML:summary_desc"></p>
Summary of memory used by currently active browsers.
For browsers which use multiple processes, memory reflects
aggregate memory used across all browser processes.<p>
For Chromium, processes used to to display diagnostics
information (such as this "about:memory") are excluded.
</p>
</div> </div>
</div> </div>
</h2> </h2>
...@@ -221,6 +198,8 @@ table.list#memoryDetails tr.firstRow th:nth-child(2) { ...@@ -221,6 +198,8 @@ table.list#memoryDetails tr.firstRow th:nth-child(2) {
<div class="otherbrowsers">(The memory usage of our renderer processes is slightly less accurate when they are sandboxed.)</div> <div class="otherbrowsers">(The memory usage of our renderer processes is slightly less accurate when they are sandboxed.)</div>
</div> </div>
<script src="chrome://resources/js/i18n_template.js"></script>
<script src="chrome://resources/js/i18n_process.js"></script>
<script src="chrome://resources/js/jstemplate_compiled.js"></script> <script src="chrome://resources/js/jstemplate_compiled.js"></script>
</body> </body>
</html> </html>
...@@ -1239,6 +1239,10 @@ void AboutMemoryHandler::OnDetailsAvailable() { ...@@ -1239,6 +1239,10 @@ void AboutMemoryHandler::OnDetailsAvailable() {
root.SetBoolean("show_other_browsers", root.SetBoolean("show_other_browsers",
browser_defaults::kShowOtherBrowsersInAboutMemory); browser_defaults::kShowOtherBrowsersInAboutMemory);
root.SetString("summary_desc",
l10n_util::GetStringUTF16(IDS_MEMORY_USAGE_SUMMARY_DESC));
ChromeWebUIDataSource::SetFontAndTextDirection(&root);
std::string data; std::string data;
jstemplate_builder::AppendJsonJS(&root, &data); jstemplate_builder::AppendJsonJS(&root, &data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment