summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorrahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-22 22:17:57 +0000
committerrahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-22 22:17:57 +0000
commit9c791f97c1eec79f10baf6144e6a0526cb4ebad0 (patch)
tree30062562d605e8b9db0e7a535cf382d298727f11 /chrome
parent4f7ce3e8339973a5e790b925ee1463e338ed0edb (diff)
downloadchromium_src-9c791f97c1eec79f10baf6144e6a0526cb4ebad0.zip
chromium_src-9c791f97c1eec79f10baf6144e6a0526cb4ebad0.tar.gz
chromium_src-9c791f97c1eec79f10baf6144e6a0526cb4ebad0.tar.bz2
Move distribution specific theme images:
- Google Chrome images are in internal repository now and get checked out into app\theme\google_chrome so delete them from app\theme - Add Chromium images to app\theme\Chromium - Modify html inlining script to pick up images from different places depending on environment variable (for now the default is google chrome which will change to chromium). - Moving icon file to private repository as well so delete it from public repository. In its place add chromium icon. - chromium\product_logo.png is a not actually a logo but just the blue icon in the same size as google_chrome\product_logo.png. This file makes about:version and new tab page look prettier (imo). BUG=1296800 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1249 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/chrome_dll.rc6
-rw-r--r--chrome/app/chrome_dll.vcproj4
-rw-r--r--chrome/app/chrome_exe.rc6
-rw-r--r--chrome/app/resources/chrome.icobin22486 -> 0 bytes
-rw-r--r--chrome/app/theme/about_background.pngbin32018 -> 0 bytes
-rw-r--r--chrome/app/theme/about_background_rtl.pngbin36149 -> 0 bytes
-rw-r--r--chrome/app/theme/chromium/about_background.pngbin0 -> 30205 bytes
-rw-r--r--chrome/app/theme/chromium/about_background_rtl.pngbin0 -> 30264 bytes
-rw-r--r--chrome/app/theme/chromium/chromium.icobin0 -> 24942 bytes
-rw-r--r--chrome/app/theme/chromium/product_logo.pngbin0 -> 7722 bytes
-rw-r--r--chrome/app/theme/chromium/wizard_icon.pngbin0 -> 6805 bytes
-rw-r--r--chrome/app/theme/chromium/wizard_icon_rtl.pngbin0 -> 6912 bytes
-rw-r--r--chrome/app/theme/distribution_resources.rc26
-rw-r--r--chrome/app/theme/distributor_logo.pngbin1508 -> 0 bytes
-rw-r--r--chrome/app/theme/distributor_logo_light.pngbin1085 -> 0 bytes
-rw-r--r--chrome/app/theme/google_theme_resources.rc15
-rw-r--r--chrome/app/theme/product_logo.pngbin6378 -> 0 bytes
-rw-r--r--chrome/app/theme/theme_dll.vcproj2
-rw-r--r--chrome/app/theme/theme_resources.rc5
-rw-r--r--chrome/app/theme/wizard_icon.pngbin7412 -> 0 bytes
-rw-r--r--chrome/app/theme/wizard_icon_rtl.pngbin7468 -> 0 bytes
-rw-r--r--chrome/browser/resources/about_version.html2
-rw-r--r--chrome/browser/resources/new_tab.html2
-rw-r--r--chrome/tools/build/win/html_inline.py27
24 files changed, 60 insertions, 35 deletions
diff --git a/chrome/app/chrome_dll.rc b/chrome/app/chrome_dll.rc
index 4d25159..2e6c48d 100644
--- a/chrome/app/chrome_dll.rc
+++ b/chrome/app/chrome_dll.rc
@@ -142,7 +142,11 @@ END
// the icon from the current module). We can perhaps work around this in the
// future to get the icon from the .exe, which would save a copy.
-IDR_MAINFRAME ICON "resources\\chrome.ico"
+#if defined(GOOGLE_CHROME_BUILD)
+IDR_MAINFRAME ICON "theme\google_chrome\chrome.ico"
+#else
+IDR_MAINFRAME ICON "theme\chromium\chromium.ico"
+#endif
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/chrome/app/chrome_dll.vcproj b/chrome/app/chrome_dll.vcproj
index 1ce83f9..15763da 100644
--- a/chrome/app/chrome_dll.vcproj
+++ b/chrome/app/chrome_dll.vcproj
@@ -235,10 +235,6 @@
</File>
</Filter>
<File
- RelativePath=".\resources\chrome.ico"
- >
- </File>
- <File
RelativePath=".\chrome_dll_main.cc"
>
</File>
diff --git a/chrome/app/chrome_exe.rc b/chrome/app/chrome_exe.rc
index 600b959..34fe345 100644
--- a/chrome/app/chrome_exe.rc
+++ b/chrome/app/chrome_exe.rc
@@ -61,7 +61,11 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDR_MAINFRAME ICON "resources\\chrome.ico"
+#if defined(GOOGLE_CHROME_BUILD)
+IDR_MAINFRAME ICON "theme\google_chrome\chrome.ico"
+#else
+IDR_MAINFRAME ICON "theme\chromium\chromium.ico"
+#endif
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/app/resources/chrome.ico b/chrome/app/resources/chrome.ico
deleted file mode 100644
index 64e8611..0000000
--- a/chrome/app/resources/chrome.ico
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/about_background.png b/chrome/app/theme/about_background.png
deleted file mode 100644
index aebd3d7..0000000
--- a/chrome/app/theme/about_background.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/about_background_rtl.png b/chrome/app/theme/about_background_rtl.png
deleted file mode 100644
index f7e7cce..0000000
--- a/chrome/app/theme/about_background_rtl.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/chromium/about_background.png b/chrome/app/theme/chromium/about_background.png
new file mode 100644
index 0000000..479f320
--- /dev/null
+++ b/chrome/app/theme/chromium/about_background.png
Binary files differ
diff --git a/chrome/app/theme/chromium/about_background_rtl.png b/chrome/app/theme/chromium/about_background_rtl.png
new file mode 100644
index 0000000..42a31f5
--- /dev/null
+++ b/chrome/app/theme/chromium/about_background_rtl.png
Binary files differ
diff --git a/chrome/app/theme/chromium/chromium.ico b/chrome/app/theme/chromium/chromium.ico
new file mode 100644
index 0000000..f267ad8
--- /dev/null
+++ b/chrome/app/theme/chromium/chromium.ico
Binary files differ
diff --git a/chrome/app/theme/chromium/product_logo.png b/chrome/app/theme/chromium/product_logo.png
new file mode 100644
index 0000000..65ce343
--- /dev/null
+++ b/chrome/app/theme/chromium/product_logo.png
Binary files differ
diff --git a/chrome/app/theme/chromium/wizard_icon.png b/chrome/app/theme/chromium/wizard_icon.png
new file mode 100644
index 0000000..fba699c
--- /dev/null
+++ b/chrome/app/theme/chromium/wizard_icon.png
Binary files differ
diff --git a/chrome/app/theme/chromium/wizard_icon_rtl.png b/chrome/app/theme/chromium/wizard_icon_rtl.png
new file mode 100644
index 0000000..755af89
--- /dev/null
+++ b/chrome/app/theme/chromium/wizard_icon_rtl.png
Binary files differ
diff --git a/chrome/app/theme/distribution_resources.rc b/chrome/app/theme/distribution_resources.rc
new file mode 100644
index 0000000..4952d42
--- /dev/null
+++ b/chrome/app/theme/distribution_resources.rc
@@ -0,0 +1,26 @@
+// Resources used by common/*.
+//
+// Paths in this file are relative to the current file.
+
+#include "theme_resources.h"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// data resources
+//
+
+#if defined(GOOGLE_CHROME_BUILD)
+IDR_ABOUT_BACKGROUND BINDATA "google_chrome/about_background.png"
+IDR_ABOUT_BACKGROUND_RTL BINDATA "google_chrome/about_background_rtl.png"
+IDR_DISTRIBUTOR_LOGO BINDATA "google_chrome/distributor_logo.png"
+IDR_DISTRIBUTOR_LOGO_LIGHT BINDATA "google_chrome/distributor_logo_light.png"
+IDR_PRODUCT_LOGO BINDATA "google_chrome/product_logo.png"
+IDR_WIZARD_ICON BINDATA "google_chrome/wizard_icon.png"
+IDR_WIZARD_ICON_RTL BINDATA "google_chrome/wizard_icon_rtl.png"
+#else
+IDR_ABOUT_BACKGROUND BINDATA "chromium/about_background.png"
+IDR_ABOUT_BACKGROUND_RTL BINDATA "chromium/about_background_rtl.png"
+IDR_PRODUCT_LOGO BINDATA "chromium/product_logo.png"
+IDR_WIZARD_ICON BINDATA "chromium/wizard_icon.png"
+IDR_WIZARD_ICON_RTL BINDATA "chromium/wizard_icon_rtl.png"
+#endif
diff --git a/chrome/app/theme/distributor_logo.png b/chrome/app/theme/distributor_logo.png
deleted file mode 100644
index ebe8ad0..0000000
--- a/chrome/app/theme/distributor_logo.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/distributor_logo_light.png b/chrome/app/theme/distributor_logo_light.png
deleted file mode 100644
index 8a2b067..0000000
--- a/chrome/app/theme/distributor_logo_light.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/google_theme_resources.rc b/chrome/app/theme/google_theme_resources.rc
deleted file mode 100644
index 5c16eeb..0000000
--- a/chrome/app/theme/google_theme_resources.rc
+++ /dev/null
@@ -1,15 +0,0 @@
-// Resources used by common/*.
-//
-// Paths in this file are relative to the current file.
-
-#include "theme_resources.h"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// data resources
-//
-
-#if defined(GOOGLE_CHROME_BUILD)
-IDR_DISTRIBUTOR_LOGO BINDATA "distributor_logo.png"
-IDR_DISTRIBUTOR_LOGO_LIGHT BINDATA "distributor_logo_light.png"
-#endif
diff --git a/chrome/app/theme/product_logo.png b/chrome/app/theme/product_logo.png
deleted file mode 100644
index 9d3c827..0000000
--- a/chrome/app/theme/product_logo.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/theme_dll.vcproj b/chrome/app/theme/theme_dll.vcproj
index 66c7925..a0e2bf9 100644
--- a/chrome/app/theme/theme_dll.vcproj
+++ b/chrome/app/theme/theme_dll.vcproj
@@ -148,7 +148,7 @@
>
</File>
<File
- RelativePath="google_theme_resources.rc"
+ RelativePath="distribution_resources.rc"
>
</File>
</Files>
diff --git a/chrome/app/theme/theme_resources.rc b/chrome/app/theme/theme_resources.rc
index a55f83a..18b6cef 100644
--- a/chrome/app/theme/theme_resources.rc
+++ b/chrome/app/theme/theme_resources.rc
@@ -238,7 +238,6 @@ IDR_CONSTRAINED_TOP_CENTER_V BINDATA "constrained_top_center_v.png"
IDR_CONSTRAINED_TOP_LEFT_CORNER_V BINDATA "constrained_top_left_corner_v.png"
IDR_CONSTRAINED_TOP_RIGHT_CORNER_V BINDATA "constrained_top_right_corner_v.png"
IDR_LOCATION_BAR_KEYWORD_HINT_TAB BINDATA "keyword_hint_tab.png"
-IDR_ABOUT_BACKGROUND BINDATA "about_background.png"
IDR_SAD_FAVICON BINDATA "sadfavicon.png"
IDR_TAB_DROP_UP BINDATA "tab_drop_up.png"
IDR_TAB_DROP_DOWN BINDATA "tab_drop_down.png"
@@ -258,15 +257,12 @@ IDR_INFO_BUBBLE_CORNER_TOP_LEFT BINDATA "bubble_corner_tl.png"
IDR_INFO_BUBBLE_CORNER_TOP_RIGHT BINDATA "bubble_corner_tr.png"
IDR_INFO_BUBBLE_CORNER_BOTTOM_LEFT BINDATA "bubble_corner_bl.png"
IDR_INFO_BUBBLE_CORNER_BOTTOM_RIGHT BINDATA "bubble_corner_br.png"
-IDR_WIZARD_ICON BINDATA "wizard_icon.png"
IDR_MENU_MARKER BINDATA "menu_marker.png"
IDR_FROZEN_TAB_ICON BINDATA "frozen_tab.png"
IDR_FROZEN_PLUGIN_ICON BINDATA "frozen_plugin.png"
IDR_UPDATE_AVAILABLE BINDATA "update_available.png"
IDR_MENU_PAGE BINDATA "menu_page.png"
IDR_MENU_CHROME BINDATA "menu_chrome.png"
-IDR_ABOUT_BACKGROUND_RTL BINDATA "about_background_rtl.png"
-IDR_WIZARD_ICON_RTL BINDATA "wizard_icon_rtl.png"
IDR_LOCATIONBG_POPUPMODE_LEFT BINDATA "locationbg_readonly_left.png"
IDR_LOCATIONBG_POPUPMODE_CENTER BINDATA "locationbg_readonly_center.png"
IDR_LOCATIONBG_POPUPMODE_RIGHT BINDATA "locationbg_readonly_right.png"
@@ -305,4 +301,3 @@ IDR_FIND_DLG_RIGHT_BB_BACKGROUND BINDATA "find_dlg_right_bb_bg.png"
IDR_FIND_DLG_MIDDLE_BB_BACKGROUND BINDATA "find_dlg_middle_bb_bg.png"
IDR_THROBBER_LIGHT BINDATA "throbber_light.png"
IDR_OTR_ICON_STANDALONE BINDATA "otr_icon_standalone.png"
-IDR_PRODUCT_LOGO BINDATA "product_logo.png"
diff --git a/chrome/app/theme/wizard_icon.png b/chrome/app/theme/wizard_icon.png
deleted file mode 100644
index 36eca6f..0000000
--- a/chrome/app/theme/wizard_icon.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/wizard_icon_rtl.png b/chrome/app/theme/wizard_icon_rtl.png
deleted file mode 100644
index 10132b2..0000000
--- a/chrome/app/theme/wizard_icon_rtl.png
+++ /dev/null
Binary files differ
diff --git a/chrome/browser/resources/about_version.html b/chrome/browser/resources/about_version.html
index 1df848b..0b8c091 100644
--- a/chrome/browser/resources/about_version.html
+++ b/chrome/browser/resources/about_version.html
@@ -65,7 +65,7 @@ about:version template page
<body>
<div id="outer">
<div id="logo">
- <img src="../../app/theme/product_logo.png" />
+ <img src="../../app/theme/%DISTRIBUTION%/product_logo.png" />
<div id="company" jscontent="company"></div>
<div id="copyright" jscontent="copyright"></div>
</div>
diff --git a/chrome/browser/resources/new_tab.html b/chrome/browser/resources/new_tab.html
index 3c16644..a49901b 100644
--- a/chrome/browser/resources/new_tab.html
+++ b/chrome/browser/resources/new_tab.html
@@ -355,7 +355,7 @@ document.addEventListener('DOMContentLoaded', handleDOMContentLoaded);
</td>
<td valign="top" width="230">
<div align="right">
- <img src="../../app/theme/product_logo.png"
+ <img src="../../app/theme/%DISTRIBUTION%/product_logo.png"
width="145" height="52" style="padding-bottom:8px;" />
</div>
<div id="searches" class="sidebar">
diff --git a/chrome/tools/build/win/html_inline.py b/chrome/tools/build/win/html_inline.py
index 17d24ca..1ae5ea1 100644
--- a/chrome/tools/build/win/html_inline.py
+++ b/chrome/tools/build/win/html_inline.py
@@ -38,11 +38,17 @@ This does not inline CSS styles, nor does it inline anything referenced
from an inlined file.
"""
+import os
import re
import sys
import base64
import mimetypes
-from os import path
+
+# TODO(rahulk) The default here will change to 'CHROMIUM' as soon as the buildbots
+# are ready with the correct environment variable
+DIST_DEFAULT = 'GOOGLE_CHROME'
+DIST_ENV_VAR = 'CHROMIUM_BUILD'
+DIST_SUBSTR = '%DISTRIBUTION%'
def ReadFile(input_filename):
"""Helper function that returns input_filename as a string.
@@ -58,16 +64,18 @@ def ReadFile(input_filename):
f.close()
return file_contents
-def SrcInline(src_match, base_path):
+def SrcInline(src_match, base_path, distribution):
"""regex replace function.
Takes a regex match for src="filename", attempts to read the file
at 'filename' and returns the src attribute with the file inlined
- as a data URI
+ as a data URI. If it finds DIST_SUBSTR string in file name, replaces
+ it with distribution.
Args:
src_match: regex match object with 'filename' named capturing group
base_path: path that to look for files in
+ distribution: string that should replace DIST_SUBSTR
Returns:
string
@@ -78,7 +86,8 @@ def SrcInline(src_match, base_path):
# filename is probably a URL, which we don't want to bother inlining
return src_match.group(0)
- filepath = path.join(base_path, filename)
+ filename = filename.replace('%DISTRIBUTION%', distribution)
+ filepath = os.path.join(base_path, filename)
mimetype = mimetypes.guess_type(filename)[0] or 'text/plain'
inline_data = base64.standard_b64encode(ReadFile(filepath))
@@ -97,11 +106,17 @@ def InlineFile(input_filename, output_filename):
output_filename: name of file to be written to
"""
print "inlining %s to %s" % (input_filename, output_filename)
- input_filepath = path.dirname(input_filename)
+ input_filepath = os.path.dirname(input_filename)
+ distribution = DIST_DEFAULT
+ if DIST_ENV_VAR in os.environ.keys():
+ distribution = os.environ[DIST_ENV_VAR]
+ if len(distribution) > 1 and distribution[0] == '_':
+ distribution = distribution[1:].lower()
+
def SrcReplace(src_match):
"""Helper function to provide SrcInline with the base file path"""
- return SrcInline(src_match, input_filepath)
+ return SrcInline(src_match, input_filepath, distribution)
# TODO(glen): Make this regex not match src="" text that is not inside a tag
flat_text = re.sub('src="(?P<filename>[^"\']*)"',