summaryrefslogtreecommitdiffstats
path: root/tools/grit
diff options
context:
space:
mode:
authorandybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 22:38:10 +0000
committerandybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 22:38:10 +0000
commit636507a6ed98f61845adc46736a97569bc021ffc (patch)
tree84587826f0e850b0e44325f8ab29354605d48afa /tools/grit
parent9503ca35d3f9ecd86f4766baf4ad9216fef70527 (diff)
downloadchromium_src-636507a6ed98f61845adc46736a97569bc021ffc.zip
chromium_src-636507a6ed98f61845adc46736a97569bc021ffc.tar.gz
chromium_src-636507a6ed98f61845adc46736a97569bc021ffc.tar.bz2
Revert 60997 - o Add user customizable launch type for apps by adding options in each apps context menu.
o Updated some comments that were using the outdated NOTIFY_PREF_CHANGED notification. o Make LAUNCH_PINNED the default type returned by ExtensionPrefs if it does not already exist. o Some minor refactoring within the code to reduce duplication. BUG=54731 TEST=NONE patch from issue 3419010 Review URL: http://codereview.chromium.org/3453029 TBR=andybons@chromium.org Review URL: http://codereview.chromium.org/3517004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61000 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/grit')
-rwxr-xr-xtools/grit/grit/format/html_inline.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/grit/grit/format/html_inline.py b/tools/grit/grit/format/html_inline.py
index 71d0f68..b23f951 100755
--- a/tools/grit/grit/format/html_inline.py
+++ b/tools/grit/grit/format/html_inline.py
@@ -136,12 +136,12 @@ def InlineFile(input_filename, output_filename, grd_node):
"""Helper function to inline external script files"""
return InlineFileContents(src_match, '<script>%s</script>')
- def InlineCSSText(text, css_filepath):
+ def InlineCssText(text, css_filepath):
"""Helper function that inlines external resources in CSS text"""
filepath = os.path.dirname(css_filepath)
- return InlineCSSImages(text, filepath)
+ return InlineCssBackgroundImages(text, filepath)
- def InlineCSSFile(src_match, inlined_files=inlined_files):
+ def InlineCssFile(src_match, inlined_files=inlined_files):
"""Helper function to inline external css files.
Args:
@@ -157,11 +157,11 @@ def InlineFile(input_filename, output_filename, grd_node):
inlined_files.add(filepath)
# When resolving CSS files we need to pass in the path so that relative URLs
# can be resolved.
- return '<style>%s</style>' % InlineCSSText(ReadFile(filepath), filepath)
+ return '<style>%s</style>' % InlineCssText(ReadFile(filepath), filepath)
- def InlineCSSImages(text, filepath=input_filepath):
+ def InlineCssBackgroundImages(text, filepath=input_filepath):
"""Helper function that inlines external images in CSS backgrounds."""
- return re.sub('(?:content|background(?:-image)?):[ ]*url\((?:\'|\")' +
+ return re.sub('background(?:-image)?:[ ]*url\((?:\'|\")' +
'(?P<filename>[^"\'\)\(]*)(?:\'|\")',
lambda m: SrcReplace(m, filepath),
text)
@@ -174,7 +174,7 @@ def InlineFile(input_filename, output_filename, grd_node):
flat_text = re.sub(
'<link rel="stylesheet".+?href="(?P<filename>[^"\']*)".*?>',
- InlineCSSFile,
+ InlineCssFile,
flat_text)
flat_text = re.sub(
@@ -194,7 +194,7 @@ def InlineFile(input_filename, output_filename, grd_node):
flat_text)
# TODO(arv): Only do this inside <style> tags.
- flat_text = InlineCSSImages(flat_text)
+ flat_text = InlineCssBackgroundImages(flat_text)
flat_text = re.sub('<link rel="icon".+?href="(?P<filename>[^"\']*)"',
SrcReplace,