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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 class LocationIconView; | 42 class LocationIconView; |
43 class OpenPDFInReaderView; | 43 class OpenPDFInReaderView; |
44 class ManagePasswordsIconView; | 44 class ManagePasswordsIconView; |
45 class OriginChipView; | 45 class OriginChipView; |
46 class PageActionWithBadgeView; | 46 class PageActionWithBadgeView; |
47 class PageActionImageView; | 47 class PageActionImageView; |
48 class Profile; | 48 class Profile; |
49 class SelectedKeywordView; | 49 class SelectedKeywordView; |
50 class StarView; | 50 class StarView; |
51 class TemplateURLService; | 51 class TemplateURLService; |
52 class ToolbarOriginChipView; | |
53 class TranslateIconView; | 52 class TranslateIconView; |
54 class ZoomView; | 53 class ZoomView; |
55 | 54 |
56 namespace content { | 55 namespace content { |
57 struct SSLStatus; | 56 struct SSLStatus; |
58 } | 57 } |
59 | 58 |
60 namespace gfx { | 59 namespace gfx { |
61 class SlideAnimation; | 60 class SlideAnimation; |
62 } | 61 } |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 186 |
188 // The star. It may not be visible. | 187 // The star. It may not be visible. |
189 StarView* star_view() { return star_view_; } | 188 StarView* star_view() { return star_view_; } |
190 | 189 |
191 // Toggles the translate icon on or off. | 190 // Toggles the translate icon on or off. |
192 void SetTranslateIconToggled(bool on); | 191 void SetTranslateIconToggled(bool on); |
193 | 192 |
194 // The translate icon. It may not be visible. | 193 // The translate icon. It may not be visible. |
195 TranslateIconView* translate_icon_view() { return translate_icon_view_; } | 194 TranslateIconView* translate_icon_view() { return translate_icon_view_; } |
196 | 195 |
197 void set_toolbar_origin_chip_view( | |
198 ToolbarOriginChipView* toolbar_origin_chip_view) { | |
199 toolbar_origin_chip_view_ = toolbar_origin_chip_view; | |
200 } | |
201 | |
202 // Returns the screen coordinates of the omnibox (where the URL text appears, | 196 // Returns the screen coordinates of the omnibox (where the URL text appears, |
203 // not where the icons are shown). | 197 // not where the icons are shown). |
204 gfx::Point GetOmniboxViewOrigin() const; | 198 gfx::Point GetOmniboxViewOrigin() const; |
205 | 199 |
206 // Shows |text| as an inline autocompletion. This is useful for IMEs, where | 200 // Shows |text| as an inline autocompletion. This is useful for IMEs, where |
207 // we can't show the autocompletion inside the actual OmniboxView. See | 201 // we can't show the autocompletion inside the actual OmniboxView. See |
208 // comments on |ime_inline_autocomplete_view_|. | 202 // comments on |ime_inline_autocomplete_view_|. |
209 void SetImeInlineAutocompletion(const base::string16& text); | 203 void SetImeInlineAutocompletion(const base::string16& text); |
210 | 204 |
211 // Invoked from OmniboxViewWin to show gray text autocompletion. | 205 // Invoked from OmniboxViewWin to show gray text autocompletion. |
212 void SetGrayTextAutocompletion(const base::string16& text); | 206 void SetGrayTextAutocompletion(const base::string16& text); |
213 | 207 |
214 // Returns the current gray text autocompletion. | 208 // Returns the current gray text autocompletion. |
215 base::string16 GetGrayTextAutocompletion() const; | 209 base::string16 GetGrayTextAutocompletion() const; |
216 | 210 |
217 // Set if we should show a focus rect while the location entry field is | 211 // Set if we should show a focus rect while the location entry field is |
218 // focused. Used when the toolbar is in full keyboard accessibility mode. | 212 // focused. Used when the toolbar is in full keyboard accessibility mode. |
219 // Repaints if necessary. | 213 // Repaints if necessary. |
220 virtual void SetShowFocusRect(bool show); | 214 virtual void SetShowFocusRect(bool show); |
221 | 215 |
222 // Select all of the text. Needed when the user tabs through controls | 216 // Select all of the text. Needed when the user tabs through controls |
223 // in the toolbar in full keyboard accessibility mode. | 217 // in the toolbar in full keyboard accessibility mode. |
224 virtual void SelectAll(); | 218 virtual void SelectAll(); |
225 | 219 |
226 views::ImageView* GetLocationIconView(); | 220 LocationIconView* location_icon_view() { return location_icon_view_; } |
227 const views::ImageView* GetLocationIconView() const; | |
228 | 221 |
229 // Return a view suitable for anchoring location-bar-anchored bubbles to. | |
230 views::View* GetLocationBarAnchor(); | |
231 // Return the point suitable for anchoring location-bar-anchored bubbles at. | 222 // Return the point suitable for anchoring location-bar-anchored bubbles at. |
232 // The point will be returned in the coordinates of the LocationBarView. | 223 // The point will be returned in the coordinates of the LocationBarView. |
233 gfx::Point GetLocationBarAnchorPoint() const; | 224 gfx::Point GetLocationBarAnchorPoint() const; |
234 | 225 |
235 OmniboxViewViews* omnibox_view() { return omnibox_view_; } | 226 OmniboxViewViews* omnibox_view() { return omnibox_view_; } |
236 | 227 |
237 views::View* generated_credit_card_view(); | 228 views::View* generated_credit_card_view(); |
238 | 229 |
239 // Returns the height of the control without the top and bottom | 230 // Returns the height of the control without the top and bottom |
240 // edges(i.e. the height of the edit control inside). If | 231 // edges(i.e. the height of the edit control inside). If |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 Browser* browser_; | 418 Browser* browser_; |
428 | 419 |
429 OmniboxViewViews* omnibox_view_; | 420 OmniboxViewViews* omnibox_view_; |
430 | 421 |
431 // Our delegate. | 422 // Our delegate. |
432 Delegate* delegate_; | 423 Delegate* delegate_; |
433 | 424 |
434 // Object used to paint the border. | 425 // Object used to paint the border. |
435 scoped_ptr<views::Painter> border_painter_; | 426 scoped_ptr<views::Painter> border_painter_; |
436 | 427 |
437 // The version of the origin chip that appears in the location bar. | 428 // The origin chip that may appear in the location bar. |
438 OriginChipView* origin_chip_view_; | 429 OriginChipView* origin_chip_view_; |
439 | 430 |
440 // The version of the origin chip that appears in the toolbar. | |
441 ToolbarOriginChipView* toolbar_origin_chip_view_; | |
442 | |
443 // An icon to the left of the edit field. | 431 // An icon to the left of the edit field. |
444 LocationIconView* location_icon_view_; | 432 LocationIconView* location_icon_view_; |
445 | 433 |
446 // A bubble displayed for EV HTTPS sites. | 434 // A bubble displayed for EV HTTPS sites. |
447 EVBubbleView* ev_bubble_view_; | 435 EVBubbleView* ev_bubble_view_; |
448 | 436 |
449 // A view to show inline autocompletion when an IME is active. In this case, | 437 // A view to show inline autocompletion when an IME is active. In this case, |
450 // we shouldn't change the text or selection inside the OmniboxView itself, | 438 // we shouldn't change the text or selection inside the OmniboxView itself, |
451 // since this will conflict with the IME's control over the text. So instead | 439 // since this will conflict with the IME's control over the text. So instead |
452 // we show any autocompletion in a separate field after the OmniboxView. | 440 // we show any autocompletion in a separate field after the OmniboxView. |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 // Used to register for notifications received by NotificationObserver. | 520 // Used to register for notifications received by NotificationObserver. |
533 content::NotificationRegistrar registrar_; | 521 content::NotificationRegistrar registrar_; |
534 | 522 |
535 // Used to bind callback functions to this object. | 523 // Used to bind callback functions to this object. |
536 base::WeakPtrFactory<LocationBarView> weak_ptr_factory_; | 524 base::WeakPtrFactory<LocationBarView> weak_ptr_factory_; |
537 | 525 |
538 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 526 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
539 }; | 527 }; |
540 | 528 |
541 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 529 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
OLD | NEW |