diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-17 01:22:41 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-17 01:22:41 +0000 |
commit | 3cda5d0875c5c52d52e395c0f35ab7cb586d0929 (patch) | |
tree | 6615606b209a79dd60bb92be9413b3909988bea4 | |
parent | 6c5da30d45fbdf44122809dc63b9df2849d9f4a8 (diff) | |
download | chromium_src-3cda5d0875c5c52d52e395c0f35ab7cb586d0929.zip chromium_src-3cda5d0875c5c52d52e395c0f35ab7cb586d0929.tar.gz chromium_src-3cda5d0875c5c52d52e395c0f35ab7cb586d0929.tar.bz2 |
Move a few non-common css files out of chrome\browser\resources\shared\css. This is in anticipation of moving chrome\browser\resources\shared to ui\webui.
BUG=169170
Review URL: https://codereview.chromium.org/11962031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177292 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser_resources.grd | 2 | ||||
-rw-r--r-- | chrome/browser/resources/about_memory.css (renamed from chrome/browser/resources/shared/css/about_memory.css) | 4 | ||||
-rw-r--r-- | chrome/browser/resources/about_memory.html | 2 | ||||
-rw-r--r-- | chrome/browser/resources/about_memory_linux.html | 2 | ||||
-rw-r--r-- | chrome/browser/resources/about_memory_mac.html | 2 | ||||
-rw-r--r-- | chrome/browser/resources/about_version.css (renamed from chrome/browser/resources/shared/css/about_version.css) | 0 | ||||
-rw-r--r-- | chrome/browser/resources/about_version.html | 2 | ||||
-rw-r--r-- | chrome/browser/resources/shared_resources.grd | 6 | ||||
-rw-r--r-- | chrome/browser/ui/webui/about_ui.cc | 13 | ||||
-rw-r--r-- | chrome/browser/ui/webui/version_ui.cc | 1 |
10 files changed, 23 insertions, 11 deletions
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index d864b78..fda712b 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd @@ -18,6 +18,7 @@ <if expr="is_win"> <structure name="IDR_ABOUT_MEMORY_HTML" file="resources\about_memory.html" flattenhtml="true" type="chrome_html" /> </if> + <structure name="IDR_ABOUT_MEMORY_CSS" file="resources\about_memory.css" type="chrome_html" /> <structure name="IDR_ABOUT_VERSION_HTML" file="resources\about_version.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" /> <if expr="pp_ifdef('android')"> <structure name="IDR_ABOUT_WELCOME_HTML" file="resources\about_welcome_android\about_welcome_android.html" flattenhtml="true" type="chrome_html" /> @@ -66,6 +67,7 @@ <include name="IDR_ABOUT_STATS_HTML" file="resources\about_stats.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> <include name="IDR_ABOUT_STATS_JS" file="resources\about_stats.js" type="BINDATA" /> <include name="IDR_ABOUT_VERSION_JS" file="resources\about_version.js" type="BINDATA" /> + <include name="IDR_ABOUT_VERSION_CSS" file="resources\about_version.css" type="BINDATA" /> <if expr="pp_ifdef('android')"> <include name="IDR_ABOUT_WELCOME_JS" file="resources\about_welcome_android\about_welcome_android.js" type="BINDATA" /> </if> diff --git a/chrome/browser/resources/shared/css/about_memory.css b/chrome/browser/resources/about_memory.css index c83e42c..4fb2772 100644 --- a/chrome/browser/resources/shared/css/about_memory.css +++ b/chrome/browser/resources/about_memory.css @@ -56,7 +56,7 @@ div#header { } div#header h1 { - background: url('../images/gear.png') 12px 60% no-repeat; + background: url('chrome://resources/images/gear.png') 12px 60% no-repeat; color: white; display: inline; margin: 0; @@ -258,7 +258,7 @@ table.list#browserComparison .name { } div.help { - background: url('../images/help.png') center bottom no-repeat; + background: url('chrome://resources/images/help.png') center bottom no-repeat; display: inline-block; height: 14px; margin: -1px 0; diff --git a/chrome/browser/resources/about_memory.html b/chrome/browser/resources/about_memory.html index b51981e..1f8a109 100644 --- a/chrome/browser/resources/about_memory.html +++ b/chrome/browser/resources/about_memory.html @@ -6,7 +6,7 @@ about:memory template page <html id="t"> <head> <title>About Memory</title> - <link rel="stylesheet" href="shared/css/about_memory.css"> + <link rel="stylesheet" href="chrome://memory-redirect/about_memory.css"> <style> body { font-family: Helvetica, Arial, sans-serif; diff --git a/chrome/browser/resources/about_memory_linux.html b/chrome/browser/resources/about_memory_linux.html index 1fb02fd..d185363 100644 --- a/chrome/browser/resources/about_memory_linux.html +++ b/chrome/browser/resources/about_memory_linux.html @@ -9,7 +9,7 @@ about:memory template page <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="chrome://memory-redirect/about_memory.css"> <link rel="stylesheet" href="about_memory_linux.css"> <script src="chrome://resources/js/load_time_data.js"></script> <script src="chrome://memory-redirect/memory.js"></script> diff --git a/chrome/browser/resources/about_memory_mac.html b/chrome/browser/resources/about_memory_mac.html index 54056fd..57c7adb 100644 --- a/chrome/browser/resources/about_memory_mac.html +++ b/chrome/browser/resources/about_memory_mac.html @@ -6,7 +6,7 @@ about:memory template page <html id="t"> <head> <title>About Memory</title> - <link rel="stylesheet" href="shared/css/about_memory.css"> + <link rel="stylesheet" href="chrome://memory-redirect/about_memory.css"> <style> body { font-family: Helvetica, sans-serif; diff --git a/chrome/browser/resources/shared/css/about_version.css b/chrome/browser/resources/about_version.css index c7197d2..c7197d2 100644 --- a/chrome/browser/resources/shared/css/about_version.css +++ b/chrome/browser/resources/about_version.css diff --git a/chrome/browser/resources/about_version.html b/chrome/browser/resources/about_version.html index 057c8e5..c24d23d 100644 --- a/chrome/browser/resources/about_version.html +++ b/chrome/browser/resources/about_version.html @@ -10,7 +10,7 @@ about:version template page <if expr="pp_ifdef('android')"> <meta name="viewport" content="width=device-width"> </if> - <link rel="stylesheet" href="shared/css/about_version.css"> + <link rel="stylesheet" href="chrome://version/about_version.css"> <if expr="pp_ifdef('android')"> <link rel="stylesheet" href="about_version_android.css"> </if> diff --git a/chrome/browser/resources/shared_resources.grd b/chrome/browser/resources/shared_resources.grd index 6561d08..c1ebb02 100644 --- a/chrome/browser/resources/shared_resources.grd +++ b/chrome/browser/resources/shared_resources.grd @@ -21,8 +21,12 @@ without changes to the corresponding grd file. --> file="shared/images/checkbox_white.png" type="BINDATA" /> <include name="IDR_SHARED_IMAGES_DISABLED_SELECT" file="shared/images/disabled_select.png" type="BINDATA" /> + <include name="IDR_SHARED_IMAGES_GEAR" + file="shared/images/gear.png" type="BINDATA" /> <include name="IDR_SHARED_IMAGES_GOOGLE_TRANSPARENT" file="shared/images/google-transparent.png" type="BINDATA" /> + <include name="IDR_SHARED_IMAGES_HELP" + file="shared/images/help.png" type="BINDATA" /> <include name="IDR_SHARED_IMAGES_SELECT" file="shared/images/select.png" type="BINDATA" /> <include name="IDR_SHARED_IMAGES_SPINNER" @@ -35,8 +39,6 @@ without changes to the corresponding grd file. --> file="shared/images/clouds.png" type="BINDATA" /> </includes> <structures> - <structure name="IDR_SHARED_CSS_ABOUT" - file="shared/css/about_memory.css" type="chrome_html" /> <structure name="IDR_SHARED_CSS_ALERT_OVERLAY" file="shared/css/alert_overlay.css" type="chrome_html" /> <structure name="IDR_SHARED_CSS_BUBBLE" diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc index ddb70f4..558ef76 100644 --- a/chrome/browser/ui/webui/about_ui.cc +++ b/chrome/browser/ui/webui/about_ui.cc @@ -92,6 +92,7 @@ namespace { const char kCreditsJsPath[] = "credits.js"; const char kMemoryJsPath[] = "memory.js"; +const char kMemoryCssPath[] = "about_memory.css"; const char kStatsJsPath[] = "stats.js"; const char kStringsJsPath[] = "strings.js"; @@ -558,9 +559,15 @@ void FinishMemoryDataRequest( // TODO(jamescook): Maybe this shouldn't update UMA? handler->StartFetch(MemoryDetails::UPDATE_USER_METRICS); } else { - std::string result = ResourceBundle::GetSharedInstance().GetRawDataResource( - path == kMemoryJsPath ? IDR_ABOUT_MEMORY_JS : IDR_ABOUT_MEMORY_HTML). - as_string(); + int id = IDR_ABOUT_MEMORY_HTML; + if (path == kMemoryJsPath) { + id = IDR_ABOUT_MEMORY_JS; + } else if (path == kMemoryCssPath) { + id = IDR_ABOUT_MEMORY_CSS; + } + + std::string result = + ResourceBundle::GetSharedInstance().GetRawDataResource(id).as_string(); callback.Run(base::RefCountedString::TakeString(&result)); } } diff --git a/chrome/browser/ui/webui/version_ui.cc b/chrome/browser/ui/webui/version_ui.cc index cbd89fa..5590608 100644 --- a/chrome/browser/ui/webui/version_ui.cc +++ b/chrome/browser/ui/webui/version_ui.cc @@ -120,6 +120,7 @@ ChromeWebUIDataSource* CreateVersionUIDataSource(Profile* profile) { html_source->set_use_json_js_format_v2(); html_source->set_json_path("strings.js"); html_source->add_resource_path("version.js", IDR_ABOUT_VERSION_JS); + html_source->add_resource_path("about_version.css", IDR_ABOUT_VERSION_CSS); html_source->set_default_resource(IDR_ABOUT_VERSION_HTML); return html_source; } |