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

Side by Side Diff: chrome/browser/ui/cocoa/l10n_util.h

Issue 16012017: Use a direct include of strings headers in chrome/browser/ui/cocoa/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/string16.h" 7 #include "base/strings/string16.h"
8 8
9 namespace cocoa_l10n_util { 9 namespace cocoa_l10n_util {
10 10
11 // Compare function for -[NSArray sortedArrayUsingFunction:context:] that 11 // Compare function for -[NSArray sortedArrayUsingFunction:context:] that
12 // sorts the views in Y order bottom up. |context| is ignored. 12 // sorts the views in Y order bottom up. |context| is ignored.
13 NSInteger CompareFrameY(id view1, id view2, void* context); 13 NSInteger CompareFrameY(id view1, id view2, void* context);
14 14
15 // Helper for tweaking views. If view is a: 15 // Helper for tweaking views. If view is a:
16 // checkbox, radio group or label: it gets a forced wrap at current size 16 // checkbox, radio group or label: it gets a forced wrap at current size
17 // editable field: left as is 17 // editable field: left as is
18 // anything else: do +[GTMUILocalizerAndLayoutTweaker sizeToFitView:] 18 // anything else: do +[GTMUILocalizerAndLayoutTweaker sizeToFitView:]
19 NSSize WrapOrSizeToFit(NSView* view); 19 NSSize WrapOrSizeToFit(NSView* view);
20 20
21 // Walks views in top-down order, wraps each to their current width, and moves 21 // Walks views in top-down order, wraps each to their current width, and moves
22 // the latter ones down to prevent overlaps. Returns the vertical delta in view 22 // the latter ones down to prevent overlaps. Returns the vertical delta in view
23 // coordinates. 23 // coordinates.
24 CGFloat VerticallyReflowGroup(NSArray* views); 24 CGFloat VerticallyReflowGroup(NSArray* views);
25 25
26 // Like |ReplaceStringPlaceholders(const string16&, const string16&, size_t*)|, 26 // Like |ReplaceStringPlaceholders(const string16&, const string16&, size_t*)|,
27 // but for a NSString formatString. 27 // but for a NSString formatString.
28 NSString* ReplaceNSStringPlaceholders(NSString* formatString, 28 NSString* ReplaceNSStringPlaceholders(NSString* formatString,
29 const string16& a, 29 const string16& a,
30 size_t* offset); 30 size_t* offset);
31 31
32 } // namespace cocoa_l10n_util 32 } // namespace cocoa_l10n_util
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/translate_infobar_unittest.mm ('k') | chrome/browser/ui/cocoa/l10n_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698