| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_LOCATION_BAR_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_LOCATION_BAR_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_LOCATION_BAR_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // | 140 // |
| 141 // SelectedKeywordView maintains two labels. One label contains the | 141 // SelectedKeywordView maintains two labels. One label contains the |
| 142 // complete description of the keyword, the second contains a truncated | 142 // complete description of the keyword, the second contains a truncated |
| 143 // version of the description. The second is used if there is not enough room | 143 // version of the description. The second is used if there is not enough room |
| 144 // to display the complete description. | 144 // to display the complete description. |
| 145 class SelectedKeywordView : public views::View { | 145 class SelectedKeywordView : public views::View { |
| 146 public: | 146 public: |
| 147 explicit SelectedKeywordView(Profile* profile); | 147 explicit SelectedKeywordView(Profile* profile); |
| 148 virtual ~SelectedKeywordView(); | 148 virtual ~SelectedKeywordView(); |
| 149 | 149 |
| 150 void SetFont(const ChromeFont& font); | 150 void SetFont(const gfx::Font& font); |
| 151 | 151 |
| 152 virtual void Paint(ChromeCanvas* canvas); | 152 virtual void Paint(ChromeCanvas* canvas); |
| 153 | 153 |
| 154 virtual gfx::Size GetPreferredSize(); | 154 virtual gfx::Size GetPreferredSize(); |
| 155 virtual gfx::Size GetMinimumSize(); | 155 virtual gfx::Size GetMinimumSize(); |
| 156 virtual void Layout(); | 156 virtual void Layout(); |
| 157 | 157 |
| 158 // The current keyword, or an empty string if no keyword is displayed. | 158 // The current keyword, or an empty string if no keyword is displayed. |
| 159 void SetKeyword(const std::wstring& keyword); | 159 void SetKeyword(const std::wstring& keyword); |
| 160 std::wstring keyword() const { return keyword_; } | 160 std::wstring keyword() const { return keyword_; } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 190 // Internally KeywordHintView uses two labels to render the text, and draws | 190 // Internally KeywordHintView uses two labels to render the text, and draws |
| 191 // the tab image itself. | 191 // the tab image itself. |
| 192 // | 192 // |
| 193 // NOTE: This should really be called LocationBarKeywordHintView, but I | 193 // NOTE: This should really be called LocationBarKeywordHintView, but I |
| 194 // couldn't bring myself to use such a long name. | 194 // couldn't bring myself to use such a long name. |
| 195 class KeywordHintView : public views::View { | 195 class KeywordHintView : public views::View { |
| 196 public: | 196 public: |
| 197 explicit KeywordHintView(Profile* profile); | 197 explicit KeywordHintView(Profile* profile); |
| 198 virtual ~KeywordHintView(); | 198 virtual ~KeywordHintView(); |
| 199 | 199 |
| 200 void SetFont(const ChromeFont& font); | 200 void SetFont(const gfx::Font& font); |
| 201 | 201 |
| 202 void SetColor(const SkColor& color); | 202 void SetColor(const SkColor& color); |
| 203 | 203 |
| 204 void SetKeyword(const std::wstring& keyword); | 204 void SetKeyword(const std::wstring& keyword); |
| 205 std::wstring keyword() const { return keyword_; } | 205 std::wstring keyword() const { return keyword_; } |
| 206 | 206 |
| 207 virtual void Paint(ChromeCanvas* canvas); | 207 virtual void Paint(ChromeCanvas* canvas); |
| 208 virtual gfx::Size GetPreferredSize(); | 208 virtual gfx::Size GetPreferredSize(); |
| 209 // The minimum size is just big enough to show the tab. | 209 // The minimum size is just big enough to show the tab. |
| 210 virtual gfx::Size GetMinimumSize(); | 210 virtual gfx::Size GetMinimumSize(); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 // entered or selected. | 437 // entered or selected. |
| 438 std::wstring location_input_; | 438 std::wstring location_input_; |
| 439 | 439 |
| 440 // The user's desired disposition for how their input should be opened | 440 // The user's desired disposition for how their input should be opened |
| 441 WindowOpenDisposition disposition_; | 441 WindowOpenDisposition disposition_; |
| 442 | 442 |
| 443 // The transition type to use for the navigation | 443 // The transition type to use for the navigation |
| 444 PageTransition::Type transition_; | 444 PageTransition::Type transition_; |
| 445 | 445 |
| 446 // Font used by edit and some of the hints. | 446 // Font used by edit and some of the hints. |
| 447 ChromeFont font_; | 447 gfx::Font font_; |
| 448 | 448 |
| 449 // Location_entry view wrapper | 449 // Location_entry view wrapper |
| 450 views::HWNDView* location_entry_view_; | 450 views::HWNDView* location_entry_view_; |
| 451 | 451 |
| 452 // The following views are used to provide hints and remind the user as to | 452 // The following views are used to provide hints and remind the user as to |
| 453 // what is going in the edit. They are all added a children of the | 453 // what is going in the edit. They are all added a children of the |
| 454 // LocationBarView. At most one is visible at a time. Preference is | 454 // LocationBarView. At most one is visible at a time. Preference is |
| 455 // given to the keyword_view_, then hint_view_, then type_to_search_view_. | 455 // given to the keyword_view_, then hint_view_, then type_to_search_view_. |
| 456 | 456 |
| 457 // Shown if the user has selected a keyword. | 457 // Shown if the user has selected a keyword. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 477 bool popup_window_mode_; | 477 bool popup_window_mode_; |
| 478 | 478 |
| 479 // Used schedule a task for the first run info bubble. | 479 // Used schedule a task for the first run info bubble. |
| 480 ScopedRunnableMethodFactory<LocationBarView> first_run_bubble_; | 480 ScopedRunnableMethodFactory<LocationBarView> first_run_bubble_; |
| 481 | 481 |
| 482 // The positioner that places the autocomplete popup. | 482 // The positioner that places the autocomplete popup. |
| 483 AutocompletePopupPositioner* popup_positioner_; | 483 AutocompletePopupPositioner* popup_positioner_; |
| 484 }; | 484 }; |
| 485 | 485 |
| 486 #endif // CHROME_BROWSER_VIEWS_LOCATION_BAR_VIEW_H_ | 486 #endif // CHROME_BROWSER_VIEWS_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |