OLD | NEW |
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 #ifndef CHROME_BROWSER_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ |
6 #define CHROME_BROWSER_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "gfx/size.h" | 10 #include "gfx/size.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 std::wstring keyword() const { return keyword_; } | 39 std::wstring keyword() const { return keyword_; } |
40 | 40 |
41 virtual void Paint(gfx::Canvas* canvas); | 41 virtual void Paint(gfx::Canvas* canvas); |
42 virtual gfx::Size GetPreferredSize(); | 42 virtual gfx::Size GetPreferredSize(); |
43 // The minimum size is just big enough to show the tab. | 43 // The minimum size is just big enough to show the tab. |
44 virtual gfx::Size GetMinimumSize(); | 44 virtual gfx::Size GetMinimumSize(); |
45 virtual void Layout(); | 45 virtual void Layout(); |
46 | 46 |
47 void set_profile(Profile* profile) { profile_ = profile; } | 47 void set_profile(Profile* profile) { profile_ = profile; } |
48 | 48 |
49 // Returns the short name for a keyword. | |
50 static std::wstring GetKeywordName(Profile* profile, | |
51 const std::wstring& keyword); | |
52 | |
53 private: | 49 private: |
54 views::Label* leading_label_; | 50 views::Label* leading_label_; |
55 views::Label* trailing_label_; | 51 views::Label* trailing_label_; |
56 | 52 |
57 // The keyword. | 53 // The keyword. |
58 std::wstring keyword_; | 54 std::wstring keyword_; |
59 | 55 |
60 Profile* profile_; | 56 Profile* profile_; |
61 | 57 |
62 DISALLOW_IMPLICIT_CONSTRUCTORS(KeywordHintView); | 58 DISALLOW_IMPLICIT_CONSTRUCTORS(KeywordHintView); |
63 }; | 59 }; |
64 | 60 |
65 #endif // CHROME_BROWSER_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ | 61 #endif // CHROME_BROWSER_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ |
OLD | NEW |