| OLD | NEW |
| 1 // Copyright (c) 2012 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_SELECTED_KEYWORD_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SELECTED_KEYWORD_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SELECTED_KEYWORD_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SELECTED_KEYWORD_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 gfx::Size GetMinimumSize() const override; | 40 gfx::Size GetMinimumSize() const override; |
| 41 void Layout() override; | 41 void Layout() override; |
| 42 | 42 |
| 43 // The current keyword, or an empty string if no keyword is displayed. | 43 // The current keyword, or an empty string if no keyword is displayed. |
| 44 void SetKeyword(const base::string16& keyword); | 44 void SetKeyword(const base::string16& keyword); |
| 45 const base::string16& keyword() const { return keyword_; } | 45 const base::string16& keyword() const { return keyword_; } |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 // IconLabelBubbleView: | 48 // IconLabelBubbleView: |
| 49 const char* GetClassName() const override; | 49 const char* GetClassName() const override; |
| 50 int GetImageAndPaddingWidth() const override; | |
| 51 | 50 |
| 52 SkColor text_color_; | 51 SkColor text_color_; |
| 53 | 52 |
| 54 // The keyword we're showing. If empty, no keyword is selected. | 53 // The keyword we're showing. If empty, no keyword is selected. |
| 55 // NOTE: we don't cache the TemplateURL as it is possible for it to get | 54 // NOTE: we don't cache the TemplateURL as it is possible for it to get |
| 56 // deleted out from under us. | 55 // deleted out from under us. |
| 57 base::string16 keyword_; | 56 base::string16 keyword_; |
| 58 | 57 |
| 59 // These labels are never visible. They are used to size the view. One | 58 // These labels are never visible. They are used to size the view. One |
| 60 // label contains the complete description of the keyword, the second | 59 // label contains the complete description of the keyword, the second |
| 61 // contains a truncated version of the description, for if there is not | 60 // contains a truncated version of the description, for if there is not |
| 62 // enough room to display the complete description. | 61 // enough room to display the complete description. |
| 63 views::Label full_label_; | 62 views::Label full_label_; |
| 64 views::Label partial_label_; | 63 views::Label partial_label_; |
| 65 | 64 |
| 66 Profile* profile_; | 65 Profile* profile_; |
| 67 | 66 |
| 68 DISALLOW_COPY_AND_ASSIGN(SelectedKeywordView); | 67 DISALLOW_COPY_AND_ASSIGN(SelectedKeywordView); |
| 69 }; | 68 }; |
| 70 | 69 |
| 71 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SELECTED_KEYWORD_VIEW_H_ | 70 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_SELECTED_KEYWORD_VIEW_H_ |
| OLD | NEW |