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

Side by Side Diff: ui/base/cocoa/controls/hyperlink_text_view.h

Issue 1364113003: Only (and always) put URLs in NSLinkAttributeName. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@infobar1
Patch Set: stray deletion Created 5 years, 2 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/base/ui_base_export.h" 7 #include "ui/base/ui_base_export.h"
8 8
9 @class NSColor; 9 @class NSColor;
10 10
11 // HyperlinkTextView is an NSTextView subclass for unselectable, linkable text. 11 // HyperlinkTextView is an NSTextView subclass for unselectable, linkable text.
12 // This subclass doesn't show the text caret or IBeamCursor, whereas the base 12 // This subclass doesn't show the text caret or IBeamCursor, whereas the base
13 // class NSTextView displays both with full keyboard accessibility enabled. 13 // class NSTextView displays both with full keyboard accessibility enabled.
14 UI_BASE_EXPORT 14 UI_BASE_EXPORT
15 @interface HyperlinkTextView : NSTextView { 15 @interface HyperlinkTextView : NSTextView {
16 @private 16 @private
17 BOOL refusesFirstResponder_; 17 BOOL refusesFirstResponder_;
18 BOOL drawsBackgroundUsingSuperview_; 18 BOOL drawsBackgroundUsingSuperview_;
19 } 19 }
20 20
21 @property(nonatomic, assign) BOOL drawsBackgroundUsingSuperview; 21 @property(nonatomic, assign) BOOL drawsBackgroundUsingSuperview;
22 22
23 // Set the |message| displayed by the HyperlinkTextView, using |font| and 23 // Set the |message| displayed by the HyperlinkTextView, using |font| and
24 // |messageColor|. 24 // |messageColor|.
25 - (void)setMessage:(NSString*)message 25 - (void)setMessage:(NSString*)message
26 withFont:(NSFont*)font 26 withFont:(NSFont*)font
27 messageColor:(NSColor*)messageColor; 27 messageColor:(NSColor*)messageColor;
28 28
29 // Marks a |range| within the given message as link, associating it with 29 // Marks a |range| within the given message as link.
30 // a |name| that is passed to the delegate's textView:clickedOnLink:atIndex:.
31 - (void)addLinkRange:(NSRange)range 30 - (void)addLinkRange:(NSRange)range
32 withName:(id)name 31 withURL:(NSString*)url
33 linkColor:(NSColor*)linkColor; 32 linkColor:(NSColor*)linkColor;
34 33
35 // This is NO (by default) if the view rejects first responder status. 34 // This is NO (by default) if the view rejects first responder status.
36 - (void)setRefusesFirstResponder:(BOOL)refusesFirstResponder; 35 - (void)setRefusesFirstResponder:(BOOL)refusesFirstResponder;
37 36
38 @end 37 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.mm ('k') | ui/base/cocoa/controls/hyperlink_text_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698