| 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_LOCATION_BAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 186 |
| 187 // Returns the screen coordinates of the omnibox (where the URL text appears, | 187 // Returns the screen coordinates of the omnibox (where the URL text appears, |
| 188 // not where the icons are shown). | 188 // not where the icons are shown). |
| 189 gfx::Point GetOmniboxViewOrigin() const; | 189 gfx::Point GetOmniboxViewOrigin() const; |
| 190 | 190 |
| 191 // Shows |text| as an inline autocompletion. This is useful for IMEs, where | 191 // Shows |text| as an inline autocompletion. This is useful for IMEs, where |
| 192 // we can't show the autocompletion inside the actual OmniboxView. See | 192 // we can't show the autocompletion inside the actual OmniboxView. See |
| 193 // comments on |ime_inline_autocomplete_view_|. | 193 // comments on |ime_inline_autocomplete_view_|. |
| 194 void SetImeInlineAutocompletion(const base::string16& text); | 194 void SetImeInlineAutocompletion(const base::string16& text); |
| 195 | 195 |
| 196 // Invoked from OmniboxViewWin to show gray text autocompletion. | |
| 197 void SetGrayTextAutocompletion(const base::string16& text); | |
| 198 | |
| 199 // Returns the current gray text autocompletion. | |
| 200 base::string16 GetGrayTextAutocompletion() const; | |
| 201 | |
| 202 // Set if we should show a focus rect while the location entry field is | 196 // Set if we should show a focus rect while the location entry field is |
| 203 // focused. Used when the toolbar is in full keyboard accessibility mode. | 197 // focused. Used when the toolbar is in full keyboard accessibility mode. |
| 204 // Repaints if necessary. | 198 // Repaints if necessary. |
| 205 virtual void SetShowFocusRect(bool show); | 199 virtual void SetShowFocusRect(bool show); |
| 206 | 200 |
| 207 // Select all of the text. Needed when the user tabs through controls | 201 // Select all of the text. Needed when the user tabs through controls |
| 208 // in the toolbar in full keyboard accessibility mode. | 202 // in the toolbar in full keyboard accessibility mode. |
| 209 virtual void SelectAll(); | 203 virtual void SelectAll(); |
| 210 | 204 |
| 211 LocationIconView* location_icon_view() { return location_icon_view_; } | 205 LocationIconView* location_icon_view() { return location_icon_view_; } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 | 300 |
| 307 // Updates the Translate icon based on the current tab's Translate status. | 301 // Updates the Translate icon based on the current tab's Translate status. |
| 308 void RefreshTranslateIcon(); | 302 void RefreshTranslateIcon(); |
| 309 | 303 |
| 310 // Updates |manage_passwords_icon_view_|. Returns true if visibility changed. | 304 // Updates |manage_passwords_icon_view_|. Returns true if visibility changed. |
| 311 bool RefreshManagePasswordsIconView(); | 305 bool RefreshManagePasswordsIconView(); |
| 312 | 306 |
| 313 // Helper to show the first run info bubble. | 307 // Helper to show the first run info bubble. |
| 314 void ShowFirstRunBubbleInternal(); | 308 void ShowFirstRunBubbleInternal(); |
| 315 | 309 |
| 316 // Returns true if the suggest text is valid. | |
| 317 bool HasValidSuggestText() const; | |
| 318 | |
| 319 // Returns text describing the URL's security level, to be placed in the | 310 // Returns text describing the URL's security level, to be placed in the |
| 320 // security chip. | 311 // security chip. |
| 321 base::string16 GetSecurityText() const; | 312 base::string16 GetSecurityText() const; |
| 322 | 313 |
| 323 bool ShouldShowKeywordBubble() const; | 314 bool ShouldShowKeywordBubble() const; |
| 324 | 315 |
| 325 // Returns true when the current page is explicitly secure or insecure. | 316 // Returns true when the current page is explicitly secure or insecure. |
| 326 // In these cases, we should show the state of the security chip. | 317 // In these cases, we should show the state of the security chip. |
| 327 bool ShouldShowSecurityChip() const; | 318 bool ShouldShowSecurityChip() const; |
| 328 | 319 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 | 409 |
| 419 // The following views are used to provide hints and remind the user as to | 410 // The following views are used to provide hints and remind the user as to |
| 420 // what is going in the edit. They are all added a children of the | 411 // what is going in the edit. They are all added a children of the |
| 421 // LocationBarView. At most one is visible at a time. Preference is | 412 // LocationBarView. At most one is visible at a time. Preference is |
| 422 // given to the keyword_view_, then hint_view_. | 413 // given to the keyword_view_, then hint_view_. |
| 423 // These autocollapse when the edit needs the room. | 414 // These autocollapse when the edit needs the room. |
| 424 | 415 |
| 425 // Shown if the user has selected a keyword. | 416 // Shown if the user has selected a keyword. |
| 426 SelectedKeywordView* selected_keyword_view_; | 417 SelectedKeywordView* selected_keyword_view_; |
| 427 | 418 |
| 428 // View responsible for showing suggested text. This is NULL when there is no | |
| 429 // suggested text. | |
| 430 views::Label* suggested_text_view_; | |
| 431 | |
| 432 // Shown if the selected url has a corresponding keyword. | 419 // Shown if the selected url has a corresponding keyword. |
| 433 KeywordHintView* keyword_hint_view_; | 420 KeywordHintView* keyword_hint_view_; |
| 434 | 421 |
| 435 // The content setting views. | 422 // The content setting views. |
| 436 ContentSettingViews content_setting_views_; | 423 ContentSettingViews content_setting_views_; |
| 437 | 424 |
| 438 // The zoom icon. | 425 // The zoom icon. |
| 439 ZoomView* zoom_view_; | 426 ZoomView* zoom_view_; |
| 440 | 427 |
| 441 // The icon to open a PDF in Reader. | 428 // The icon to open a PDF in Reader. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 // These allow toggling the verbose security state behavior via flags. | 468 // These allow toggling the verbose security state behavior via flags. |
| 482 bool should_show_secure_state_; | 469 bool should_show_secure_state_; |
| 483 bool should_show_nonsecure_state_; | 470 bool should_show_nonsecure_state_; |
| 484 bool should_animate_secure_state_; | 471 bool should_animate_secure_state_; |
| 485 bool should_animate_nonsecure_state_; | 472 bool should_animate_nonsecure_state_; |
| 486 | 473 |
| 487 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 474 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
| 488 }; | 475 }; |
| 489 | 476 |
| 490 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 477 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |