| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 31 class KeywordHintView : public views::View { | 31 class KeywordHintView : public views::View { |
| 32 public: | 32 public: |
| 33 explicit KeywordHintView(Profile* profile); | 33 explicit KeywordHintView(Profile* profile); |
| 34 virtual ~KeywordHintView(); | 34 virtual ~KeywordHintView(); |
| 35 | 35 |
| 36 void SetFont(const gfx::Font& font); | 36 void SetFont(const gfx::Font& font); |
| 37 | 37 |
| 38 void SetKeyword(const string16& keyword); | 38 void SetKeyword(const string16& keyword); |
| 39 string16 keyword() const { return keyword_; } | 39 string16 keyword() const { return keyword_; } |
| 40 | 40 |
| 41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 41 virtual void OnPaint(gfx::CanvasSkia* canvas) OVERRIDE; |
| 42 virtual gfx::Size GetPreferredSize() OVERRIDE; | 42 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 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() OVERRIDE; | 44 virtual gfx::Size GetMinimumSize() OVERRIDE; |
| 45 virtual void Layout() OVERRIDE; | 45 virtual void Layout() OVERRIDE; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 views::Label* CreateLabel(); | 48 views::Label* CreateLabel(); |
| 49 | 49 |
| 50 views::Label* leading_label_; | 50 views::Label* leading_label_; |
| 51 views::Label* trailing_label_; | 51 views::Label* trailing_label_; |
| 52 | 52 |
| 53 // The keyword. | 53 // The keyword. |
| 54 string16 keyword_; | 54 string16 keyword_; |
| 55 | 55 |
| 56 Profile* profile_; | 56 Profile* profile_; |
| 57 | 57 |
| 58 DISALLOW_IMPLICIT_CONSTRUCTORS(KeywordHintView); | 58 DISALLOW_IMPLICIT_CONSTRUCTORS(KeywordHintView); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ | 61 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_KEYWORD_HINT_VIEW_H_ |
| OLD | NEW |