| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 // Returns the height of the control without the top and bottom | 317 // Returns the height of the control without the top and bottom |
| 318 // edges(i.e. the height of the edit control inside). If | 318 // edges(i.e. the height of the edit control inside). If |
| 319 // |use_preferred_size| is true this will be the preferred height, | 319 // |use_preferred_size| is true this will be the preferred height, |
| 320 // otherwise it will be the current height. | 320 // otherwise it will be the current height. |
| 321 int GetInternalHeight(bool use_preferred_size); | 321 int GetInternalHeight(bool use_preferred_size); |
| 322 | 322 |
| 323 // Space between items in the location bar, as well as between items and the | 323 // Space between items in the location bar, as well as between items and the |
| 324 // edges. | 324 // edges. |
| 325 static int GetItemPadding(); | 325 static int GetItemPadding(); |
| 326 | 326 |
| 327 // Thickness of the left and right edges of the omnibox, in normal mode. | 327 // Thickness of the edges of the omnibox background images, in normal mode. |
| 328 static const int kNormalHorizontalEdgeThickness; | 328 static const int kNormalEdgeThickness; |
| 329 // The same, but for popup mode. | 329 // The same, but for popup mode. |
| 330 static const int kPopupEdgeThickness; | 330 static const int kPopupEdgeThickness; |
| 331 // Thickness of the top and bottom edges of the omnibox. | |
| 332 static const int kNormalVerticalEdgeThickness; | |
| 333 // Amount of padding built into the standard omnibox icons. | 331 // Amount of padding built into the standard omnibox icons. |
| 334 static const int kIconInternalPadding; | 332 static const int kIconInternalPadding; |
| 335 // Space between the edge and a bubble. | 333 // Space between the edge and a bubble. |
| 336 static const int kBubblePadding; | 334 static const int kBubblePadding; |
| 337 | 335 |
| 338 protected: | 336 protected: |
| 339 virtual void OnFocus() OVERRIDE; | 337 virtual void OnFocus() OVERRIDE; |
| 340 | 338 |
| 341 private: | 339 private: |
| 342 typedef std::vector<ContentSettingImageView*> ContentSettingViews; | 340 typedef std::vector<ContentSettingImageView*> ContentSettingViews; |
| 343 | 341 |
| 344 friend class PageActionImageView; | 342 friend class PageActionImageView; |
| 345 friend class PageActionWithBadgeView; | 343 friend class PageActionWithBadgeView; |
| 346 typedef std::vector<PageActionWithBadgeView*> PageActionViews; | 344 typedef std::vector<PageActionWithBadgeView*> PageActionViews; |
| 347 | 345 |
| 348 // Returns the thickness of any visible left and right edge, in pixels. | 346 // Returns the thickness of any visible left and right edge, in pixels. |
| 349 int GetHorizontalEdgeThickness() const; | 347 int GetHorizontalEdgeThickness() const; |
| 350 | 348 |
| 351 // The same, but for the top and bottom edges. | 349 // The same, but for the top and bottom edges. |
| 352 int vertical_edge_thickness() const { | 350 int vertical_edge_thickness() const { |
| 353 return is_popup_mode_ ? kPopupEdgeThickness : kNormalVerticalEdgeThickness; | 351 return is_popup_mode_ ? kPopupEdgeThickness : kNormalEdgeThickness; |
| 354 } | 352 } |
| 355 | 353 |
| 356 // Update the visibility state of the Content Blocked icons to reflect what is | 354 // Update the visibility state of the Content Blocked icons to reflect what is |
| 357 // actually blocked on the current page. | 355 // actually blocked on the current page. |
| 358 void RefreshContentSettingViews(); | 356 void RefreshContentSettingViews(); |
| 359 | 357 |
| 360 // Delete all page action views that we have created. | 358 // Delete all page action views that we have created. |
| 361 void DeletePageActionViews(); | 359 void DeletePageActionViews(); |
| 362 | 360 |
| 363 // Update the views for the Page Actions, to reflect state changes for | 361 // Update the views for the Page Actions, to reflect state changes for |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 // entered or selected. | 414 // entered or selected. |
| 417 string16 location_input_; | 415 string16 location_input_; |
| 418 | 416 |
| 419 // The user's desired disposition for how their input should be opened | 417 // The user's desired disposition for how their input should be opened |
| 420 WindowOpenDisposition disposition_; | 418 WindowOpenDisposition disposition_; |
| 421 | 419 |
| 422 // The transition type to use for the navigation | 420 // The transition type to use for the navigation |
| 423 content::PageTransition transition_; | 421 content::PageTransition transition_; |
| 424 | 422 |
| 425 // An object used to paint the normal-mode background. | 423 // An object used to paint the normal-mode background. |
| 426 scoped_ptr<views::Painter> background_painter_; | 424 scoped_ptr<views::Painter> background_border_painter_; |
| 425 scoped_ptr<views::Painter> background_filling_painter_; |
| 427 | 426 |
| 428 // An icon to the left of the edit field. | 427 // An icon to the left of the edit field. |
| 429 LocationIconView* location_icon_view_; | 428 LocationIconView* location_icon_view_; |
| 430 | 429 |
| 431 // A bubble displayed for EV HTTPS sites. | 430 // A bubble displayed for EV HTTPS sites. |
| 432 EVBubbleView* ev_bubble_view_; | 431 EVBubbleView* ev_bubble_view_; |
| 433 | 432 |
| 434 // Location_entry view | 433 // Location_entry view |
| 435 views::View* location_entry_view_; | 434 views::View* location_entry_view_; |
| 436 | 435 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 // in the right location. | 505 // in the right location. |
| 507 int animation_offset_; | 506 int animation_offset_; |
| 508 | 507 |
| 509 // Used to register for notifications received by NotificationObserver. | 508 // Used to register for notifications received by NotificationObserver. |
| 510 content::NotificationRegistrar registrar_; | 509 content::NotificationRegistrar registrar_; |
| 511 | 510 |
| 512 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 511 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
| 513 }; | 512 }; |
| 514 | 513 |
| 515 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 514 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |