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

Side by Side Diff: chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h

Issue 1922133002: Change 'const' -> 'constexpr' in cocoa/passwords. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_UI_COCOA_PASSWORDS_PASSWORDS_BUBBLE_UTILS_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_PASSWORDS_PASSWORDS_BUBBLE_UTILS_H_
6 #define CHROME_BROWSER_UI_COCOA_PASSWORDS_PASSWORDS_BUBBLE_UTILS_H_ 6 #define CHROME_BROWSER_UI_COCOA_PASSWORDS_PASSWORDS_BUBBLE_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #import <Cocoa/Cocoa.h> 10 #import <Cocoa/Cocoa.h>
11 11
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "third_party/skia/include/core/SkColor.h" 13 #include "third_party/skia/include/core/SkColor.h"
14 #include "ui/gfx/range/range.h" 14 #include "ui/gfx/range/range.h"
15 15
16 @class HyperlinkTextView; 16 @class HyperlinkTextView;
17 17
18 const CGFloat kDesiredBubbleWidth = 370; 18 constexpr CGFloat kDesiredBubbleWidth = 370;
19 const CGFloat kFramePadding = 16; 19 constexpr CGFloat kFramePadding = 16;
20 const CGFloat kDesiredRowWidth = kDesiredBubbleWidth - 2 * kFramePadding; 20 constexpr CGFloat kDesiredRowWidth = kDesiredBubbleWidth - 2 * kFramePadding;
21 const CGFloat kItemLabelSpacing = 10; 21 constexpr CGFloat kItemLabelSpacing = 10;
22 const CGFloat kRelatedControlHorizontalPadding = 2; 22 constexpr CGFloat kRelatedControlHorizontalPadding = 2;
23 const CGFloat kRelatedControlVerticalSpacing = 8; 23 constexpr CGFloat kRelatedControlVerticalSpacing = 8;
24 const CGFloat kTitleTextInset = 2; 24 constexpr CGFloat kTitleTextInset = 2;
25 const CGFloat kUnrelatedControlVerticalPadding = 15; 25 constexpr CGFloat kUnrelatedControlVerticalPadding = 15;
26 const CGFloat kVerticalAvatarMargin = 8; 26 constexpr CGFloat kVerticalAvatarMargin = 8;
27 27
28 // Returns a font for password bubbles. 28 // Returns a font for password bubbles.
29 NSFont* LabelFont(); 29 NSFont* LabelFont();
30 30
31 // Returns a size of a text that is defined by |resourceID| with a font 31 // Returns a size of a text that is defined by |resourceID| with a font
32 // returned by LabelFont(). 32 // returned by LabelFont().
33 NSSize LabelSize(int resourceID); 33 NSSize LabelSize(int resourceID);
34 34
35 // Initialize |textField| with |text| and default style parameters. 35 // Initialize |textField| with |text| and default style parameters.
36 void InitLabel(NSTextField* textField, const base::string16& text); 36 void InitLabel(NSTextField* textField, const base::string16& text);
(...skipping 23 matching lines...) Expand all
60 id<NSTextViewDelegate> delegate); 60 id<NSTextViewDelegate> delegate);
61 61
62 // Returns a label with |text| and small font. Nonempty |range| may specify a 62 // Returns a label with |text| and small font. Nonempty |range| may specify a
63 // link range. 63 // link range.
64 HyperlinkTextView* LabelWithLink(const base::string16& text, 64 HyperlinkTextView* LabelWithLink(const base::string16& text,
65 SkColor color, 65 SkColor color,
66 gfx::Range range, 66 gfx::Range range,
67 id<NSTextViewDelegate> delegate); 67 id<NSTextViewDelegate> delegate);
68 68
69 #endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_PASSWORDS_BUBBLE_UTILS_H_ 69 #endif // CHROME_BROWSER_UI_COCOA_PASSWORDS_PASSWORDS_BUBBLE_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698