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

Side by Side Diff: grit/gather/interface.py

Issue 10386189: Add chrome_html gatherer, which inlines html and automatically generates image set… (Closed) Base URL: http://git.chromium.org/external/grit-i18n.git@master
Patch Set: Add chrome_html_unittest to test_suite_all. Created 8 years, 6 months 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
« no previous file with comments | « grit/gather/chrome_html_unittest.py ('k') | grit/node/structure.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 '''Interface for all gatherers. 6 '''Interface for all gatherers.
7 ''' 7 '''
8 8
9 9
10 from grit import clique 10 from grit import clique
(...skipping 15 matching lines...) Expand all
26 '''Sets node attributes used by the gatherer. 26 '''Sets node attributes used by the gatherer.
27 27
28 By default, this does nothing. If special handling is desired, it should be 28 By default, this does nothing. If special handling is desired, it should be
29 overridden by the child gatherer. 29 overridden by the child gatherer.
30 30
31 Args: 31 Args:
32 attrs: The mapping of node attributes. 32 attrs: The mapping of node attributes.
33 ''' 33 '''
34 pass 34 pass
35 35
36 def SetDefines(self, defines):
37 '''Sets global defines used by the gatherer.
38
39 By default, this does nothing. If special handling is desired, it should be
40 overridden by the child gatherer.
41
42 Args:
43 defines: The mapping of define values.
44 '''
45 pass
46
36 def SetUberClique(self, uberclique): 47 def SetUberClique(self, uberclique):
37 '''Overrides the default uberclique so that cliques created by this object 48 '''Overrides the default uberclique so that cliques created by this object
38 become part of the uberclique supplied by the user. 49 become part of the uberclique supplied by the user.
39 ''' 50 '''
40 self.uberclique = uberclique 51 self.uberclique = uberclique
41 52
42 def SetSkeleton(self, is_skeleton): 53 def SetSkeleton(self, is_skeleton):
43 self.is_skeleton = is_skeleton 54 self.is_skeleton = is_skeleton
44 55
45 def IsSkeleton(self): 56 def IsSkeleton(self):
46 return self.is_skeleton 57 return self.is_skeleton
47 58
48 def Parse(self): 59 def Parse(self):
49 '''Parses the contents of what is being gathered.''' 60 '''Parses the contents of what is being gathered.'''
50 raise NotImplementedError() 61 raise NotImplementedError()
51 62
63 def GetData(self, lang, encoding):
64 '''Returns the data to be added to the DataPack for this node or None if
65 this node does not add a DataPack entry.
66 '''
67 return None
68
52 def GetText(self): 69 def GetText(self):
53 '''Returns the text of what is being gathered.''' 70 '''Returns the text of what is being gathered.'''
54 raise NotImplementedError() 71 raise NotImplementedError()
55 72
56 def GetTextualIds(self): 73 def GetTextualIds(self):
57 '''Returns the mnemonic IDs that need to be defined for the resource 74 '''Returns the mnemonic IDs that need to be defined for the resource
58 being gathered to compile correctly.''' 75 being gathered to compile correctly.'''
59 return [] 76 return []
60 77
61 def GetCliques(self): 78 def GetCliques(self):
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 raise NotImplementedError() 135 raise NotImplementedError()
119 136
120 def SubstituteMessages(self, substituter): 137 def SubstituteMessages(self, substituter):
121 '''Applies substitutions to all messages in the gatherer. 138 '''Applies substitutions to all messages in the gatherer.
122 139
123 Args: 140 Args:
124 substituter: a grit.util.Substituter object. 141 substituter: a grit.util.Substituter object.
125 ''' 142 '''
126 pass 143 pass
127 144
OLDNEW
« no previous file with comments | « grit/gather/chrome_html_unittest.py ('k') | grit/node/structure.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698