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

Issue 164260: ObjC classes generated by the build and used in Xib files is already getting ... (Closed)

Created:
11 years, 4 months ago by TVL
Modified:
9 years, 7 months ago
Reviewers:
Mark Mentovai
CC:
chromium-reviews_googlegroups.com, John Grabowski, Ben Goodger (Google)
Visibility:
Public.

Description

ObjC classes generated by the build and used in Xib files is already getting ugly, if they aren't built at build start, IB sometimes throws warnings about unknown things, so... - Use one class for the localizer and generate the table that drives it. - Update the generator script to process a list of xib files and generate one header. - Update the data within the GYP file to do this. - This might actually help overall size since it helps force one set of strings for each different window. - Switch to bsearch for table lookup since we have one, larger table now. TEST=none BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=23017

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 8

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -264 lines) Patch
M build/mac/generate_localizer View 1 2 3 4 4 chunks +36 lines, -81 lines 0 comments Download
M chrome/app/nibs/BookmarkBar.xib View 1 2 3 4 4 chunks +6 lines, -12 lines 0 comments Download
M chrome/app/nibs/BookmarkEditor.xib View 1 2 3 4 2 chunks +1 line, -9 lines 0 comments Download
M chrome/app/nibs/BookmarkNameFolder.xib View 1 2 3 4 3 chunks +3 lines, -11 lines 0 comments Download
M chrome/app/nibs/TabView.xib View 1 2 3 4 2 chunks +1 line, -9 lines 0 comments Download
M chrome/app/nibs/Toolbar.xib View 1 2 3 4 5 chunks +34 lines, -3 lines 0 comments Download
M chrome/browser/app_controller_mac.mm View 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/cocoa/ui_localizer.h View 1 2 3 4 1 chunk +2 lines, -18 lines 0 comments Download
M chrome/browser/cocoa/ui_localizer.mm View 1 2 3 4 2 chunks +55 lines, -43 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 2 chunks +22 lines, -75 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
TVL
11 years, 4 months ago (2009-08-10 18:21:06 UTC) #1
Mark Mentovai
11 years, 4 months ago (2009-08-10 19:05:55 UTC) #2
lgtm
nitty comments

http://codereview.chromium.org/164260/diff/1002/21
File build/mac/generate_localizer (left):

http://codereview.chromium.org/164260/diff/1002/21#oldcode27
Line 27: #ifndef %(class_name)s_LOCALIZER_H_
Getting rid of the #include guards?  Don't we want to keep them?

http://codereview.chromium.org/164260/diff/1002/21
File build/mac/generate_localizer (right):

http://codereview.chromium.org/164260/diff/1002/21#newcode22
Line 22: //
Now you should also say that nobody should be #including this file except for
ui_localizer.mm.

http://codereview.chromium.org/164260/diff/1002/21#newcode94
Line 94: xib_paths = argv[1:-1]
I'd put the output first and the inputs after that, because there's only one
output and there are a bunch of inputs.

http://codereview.chromium.org/164260/diff/1002/29
File chrome/browser/cocoa/ui_localizer.mm (right):

http://codereview.chromium.org/164260/diff/1002/29#newcode30
Line 30: const UILocalizerResourceMap *res_map =
const UILocalizerResourceMap* res_map =

Fix the parameters to this function too.

http://codereview.chromium.org/164260/diff/1002/29#newcode35
Line 35: }
// namespace

http://codereview.chromium.org/164260/diff/1002/29#newcode62
Line 62: // Include the table here so it is a local static (provides
kUIResources and
The parenthetical is better as its own sentence.  "Include the table here so it
is a local static.  This header provides kUIResources and kUIResourcesSize.

http://codereview.chromium.org/164260/diff/1002/29#newcode70
Line 70: kUIResources,
Too much indent

http://codereview.chromium.org/164260/diff/1002/29#newcode80
Line 80: l10n_util::GetStringUTF16(val->label_arg_id));
Do not break to new line here.

Powered by Google App Engine
This is Rietveld 408576698