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

Side by Side Diff: ui/message_center/views/bounded_label.h

Issue 271773002: Retain popup bubble mouse status even through updates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 7 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
« no previous file with comments | « no previous file | ui/message_center/views/bounded_label.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 UI_MESSAGE_CENTER_BOUNDED_LABEL_H_ 5 #ifndef UI_MESSAGE_CENTER_BOUNDED_LABEL_H_
6 #define UI_MESSAGE_CENTER_BOUNDED_LABEL_H_ 6 #define UI_MESSAGE_CENTER_BOUNDED_LABEL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 10
(...skipping 22 matching lines...) Expand all
33 // bounded_label.cc file for details. 33 // bounded_label.cc file for details.
34 class MESSAGE_CENTER_EXPORT BoundedLabel : public views::View { 34 class MESSAGE_CENTER_EXPORT BoundedLabel : public views::View {
35 public: 35 public:
36 BoundedLabel(const base::string16& text, const gfx::FontList& font_list); 36 BoundedLabel(const base::string16& text, const gfx::FontList& font_list);
37 BoundedLabel(const base::string16& text); 37 BoundedLabel(const base::string16& text);
38 virtual ~BoundedLabel(); 38 virtual ~BoundedLabel();
39 39
40 void SetColors(SkColor textColor, SkColor backgroundColor); 40 void SetColors(SkColor textColor, SkColor backgroundColor);
41 void SetLineHeight(int height); // Pass in 0 for default height. 41 void SetLineHeight(int height); // Pass in 0 for default height.
42 void SetLineLimit(int lines); // Pass in -1 for no limit. 42 void SetLineLimit(int lines); // Pass in -1 for no limit.
43 void SetText(const base::string16& text); // Additionally clears caches.
43 44
44 int GetLineHeight() const; 45 int GetLineHeight() const;
45 int GetLineLimit() const; 46 int GetLineLimit() const;
46 47
47 // Pass in a -1 width to use the preferred width, a -1 limit to skip limits. 48 // Pass in a -1 width to use the preferred width, a -1 limit to skip limits.
48 int GetLinesForWidthAndLimit(int width, int limit); 49 int GetLinesForWidthAndLimit(int width, int limit);
49 gfx::Size GetSizeForWidthAndLines(int width, int lines); 50 gfx::Size GetSizeForWidthAndLines(int width, int lines);
50 51
51 // Overridden from views::View. 52 // Overridden from views::View.
52 virtual int GetBaseline() const OVERRIDE; 53 virtual int GetBaseline() const OVERRIDE;
(...skipping 15 matching lines...) Expand all
68 69
69 scoped_ptr<InnerBoundedLabel> label_; 70 scoped_ptr<InnerBoundedLabel> label_;
70 int line_limit_; 71 int line_limit_;
71 72
72 DISALLOW_COPY_AND_ASSIGN(BoundedLabel); 73 DISALLOW_COPY_AND_ASSIGN(BoundedLabel);
73 }; 74 };
74 75
75 } // namespace message_center 76 } // namespace message_center
76 77
77 #endif // UI_MESSAGE_CENTER_BOUNDED_LABEL_H_ 78 #endif // UI_MESSAGE_CENTER_BOUNDED_LABEL_H_
OLDNEW
« no previous file with comments | « no previous file | ui/message_center/views/bounded_label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698