| 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_UI_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // couldn't bring myself to use such a long name. | 29 // couldn't bring myself to use such a long name. |
| 30 class KeywordHintView : public views::View { | 30 class KeywordHintView : public views::View { |
| 31 public: | 31 public: |
| 32 explicit KeywordHintView(Profile* profile); | 32 explicit KeywordHintView(Profile* profile); |
| 33 virtual ~KeywordHintView(); | 33 virtual ~KeywordHintView(); |
| 34 | 34 |
| 35 void SetFont(const gfx::Font& font); | 35 void SetFont(const gfx::Font& font); |
| 36 | 36 |
| 37 void SetColor(const SkColor& color); | 37 void SetColor(const SkColor& color); |
| 38 | 38 |
| 39 void SetKeyword(const string16& keyword); | 39 void SetKeyword(const std::wstring& keyword); |
| 40 string16 keyword() const { return keyword_; } | 40 std::wstring keyword() const { return keyword_; } |
| 41 | 41 |
| 42 virtual void Paint(gfx::Canvas* canvas); | 42 virtual void Paint(gfx::Canvas* canvas); |
| 43 virtual gfx::Size GetPreferredSize(); | 43 virtual gfx::Size GetPreferredSize(); |
| 44 // The minimum size is just big enough to show the tab. | 44 // The minimum size is just big enough to show the tab. |
| 45 virtual gfx::Size GetMinimumSize(); | 45 virtual gfx::Size GetMinimumSize(); |
| 46 virtual void Layout(); | 46 virtual void Layout(); |
| 47 | 47 |
| 48 void set_profile(Profile* profile) { profile_ = profile; } | 48 void set_profile(Profile* profile) { profile_ = profile; } |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 views::Label* leading_label_; | 51 views::Label* leading_label_; |
| 52 views::Label* trailing_label_; | 52 views::Label* trailing_label_; |
| 53 | 53 |
| 54 // The keyword. | 54 // The keyword. |
| 55 string16 keyword_; | 55 std::wstring keyword_; |
| 56 | 56 |
| 57 Profile* profile_; | 57 Profile* profile_; |
| 58 | 58 |
| 59 DISALLOW_IMPLICIT_CONSTRUCTORS(KeywordHintView); | 59 DISALLOW_IMPLICIT_CONSTRUCTORS(KeywordHintView); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ | 62 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ |
| OLD | NEW |