| 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 protected: | 348 protected: |
| 349 virtual void OnFocus() OVERRIDE; | 349 virtual void OnFocus() OVERRIDE; |
| 350 | 350 |
| 351 private: | 351 private: |
| 352 typedef std::vector<ContentSettingImageView*> ContentSettingViews; | 352 typedef std::vector<ContentSettingImageView*> ContentSettingViews; |
| 353 | 353 |
| 354 friend class PageActionImageView; | 354 friend class PageActionImageView; |
| 355 friend class PageActionWithBadgeView; | 355 friend class PageActionWithBadgeView; |
| 356 typedef std::vector<PageActionWithBadgeView*> PageActionViews; | 356 typedef std::vector<PageActionWithBadgeView*> PageActionViews; |
| 357 | 357 |
| 358 // Returns the amount of horizontal space (in pixels) out of | |
| 359 // |location_bar_width| that is not taken up by the actual text in | |
| 360 // location_entry_. | |
| 361 int AvailableWidth(int location_bar_width); | |
| 362 | |
| 363 // If |view| fits in |available_width|, it is made visible and positioned at | |
| 364 // the leading or trailing end of |bounds|, which are then shrunk | |
| 365 // appropriately. Otherwise |view| is made invisible. | |
| 366 // Note: |view| is expected to have already been positioned and sized | |
| 367 // vertically. | |
| 368 void LayoutView(views::View* view, | |
| 369 int padding, | |
| 370 int available_width, | |
| 371 bool leading, | |
| 372 gfx::Rect* bounds); | |
| 373 | |
| 374 // Update the visibility state of the Content Blocked icons to reflect what is | 358 // Update the visibility state of the Content Blocked icons to reflect what is |
| 375 // actually blocked on the current page. | 359 // actually blocked on the current page. |
| 376 void RefreshContentSettingViews(); | 360 void RefreshContentSettingViews(); |
| 377 | 361 |
| 378 // Delete all page action views that we have created. | 362 // Delete all page action views that we have created. |
| 379 void DeletePageActionViews(); | 363 void DeletePageActionViews(); |
| 380 | 364 |
| 381 // Update the views for the Page Actions, to reflect state changes for | 365 // Update the views for the Page Actions, to reflect state changes for |
| 382 // PageActions. | 366 // PageActions. |
| 383 void RefreshPageActionViews(); | 367 void RefreshPageActionViews(); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 // in the right location. | 502 // in the right location. |
| 519 int animation_offset_; | 503 int animation_offset_; |
| 520 | 504 |
| 521 // Used to register for notifications received by NotificationObserver. | 505 // Used to register for notifications received by NotificationObserver. |
| 522 content::NotificationRegistrar registrar_; | 506 content::NotificationRegistrar registrar_; |
| 523 | 507 |
| 524 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); | 508 DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView); |
| 525 }; | 509 }; |
| 526 | 510 |
| 527 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 511 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |