| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 // The same, but for the top and bottom edges. | 294 // The same, but for the top and bottom edges. |
| 295 int vertical_edge_thickness() const { | 295 int vertical_edge_thickness() const { |
| 296 return is_popup_mode_ ? kPopupEdgeThickness : kNormalEdgeThickness; | 296 return is_popup_mode_ ? kPopupEdgeThickness : kNormalEdgeThickness; |
| 297 } | 297 } |
| 298 | 298 |
| 299 // Updates the visibility state of the Content Blocked icons to reflect what | 299 // Updates the visibility state of the Content Blocked icons to reflect what |
| 300 // is actually blocked on the current page. Returns true if the visibility | 300 // is actually blocked on the current page. Returns true if the visibility |
| 301 // of at least one of the views in |content_setting_views_| changed. | 301 // of at least one of the views in |content_setting_views_| changed. |
| 302 bool RefreshContentSettingViews(); | 302 bool RefreshContentSettingViews(); |
| 303 | 303 |
| 304 // Deletes all page action views that we have created. | 304 // Clears |page_action_views_| and removes the elements from the view |
| 305 // hierarchy. |
| 305 void DeletePageActionViews(); | 306 void DeletePageActionViews(); |
| 306 | 307 |
| 307 // Updates the views for the Page Actions, to reflect state changes for | 308 // Updates the views for the Page Actions, to reflect state changes for |
| 308 // PageActions. Returns true if the visibility of a PageActionWithBadgeView | 309 // PageActions. Returns true if the visibility of a PageActionWithBadgeView |
| 309 // changed, or PageActionWithBadgeView were created/destroyed. | 310 // changed, or PageActionWithBadgeView were created/destroyed. |
| 310 bool RefreshPageActionViews(); | 311 bool RefreshPageActionViews(); |
| 311 | 312 |
| 313 // Whether the page actions represented by |page_action_views_| differ |
| 314 // in ordering or value from |page_actions|. |
| 315 bool PageActionsDiffer(const PageActions& page_actions) const; |
| 316 |
| 312 // Updates the view for the zoom icon based on the current tab's zoom. Returns | 317 // Updates the view for the zoom icon based on the current tab's zoom. Returns |
| 313 // true if the visibility of the view changed. | 318 // true if the visibility of the view changed. |
| 314 bool RefreshZoomView(); | 319 bool RefreshZoomView(); |
| 315 | 320 |
| 316 // Updates the Translate icon based on the current tab's Translate status. | 321 // Updates the Translate icon based on the current tab's Translate status. |
| 317 void RefreshTranslateIcon(); | 322 void RefreshTranslateIcon(); |
| 318 | 323 |
| 319 // Updates |manage_passwords_icon_view_|. Returns true if visibility changed. | 324 // Updates |manage_passwords_icon_view_|. Returns true if visibility changed. |
| 320 bool RefreshManagePasswordsIconView(); | 325 bool RefreshManagePasswordsIconView(); |
| 321 | 326 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 344 // LocationBar: | 349 // LocationBar: |
| 345 void ShowFirstRunBubble() override; | 350 void ShowFirstRunBubble() override; |
| 346 GURL GetDestinationURL() const override; | 351 GURL GetDestinationURL() const override; |
| 347 WindowOpenDisposition GetWindowOpenDisposition() const override; | 352 WindowOpenDisposition GetWindowOpenDisposition() const override; |
| 348 ui::PageTransition GetPageTransition() const override; | 353 ui::PageTransition GetPageTransition() const override; |
| 349 void AcceptInput() override; | 354 void AcceptInput() override; |
| 350 void FocusSearch() override; | 355 void FocusSearch() override; |
| 351 void UpdateContentSettingsIcons() override; | 356 void UpdateContentSettingsIcons() override; |
| 352 void UpdateManagePasswordsIconAndBubble() override; | 357 void UpdateManagePasswordsIconAndBubble() override; |
| 353 void UpdatePageActions() override; | 358 void UpdatePageActions() override; |
| 354 void InvalidatePageActions() override; | |
| 355 void UpdateBookmarkStarVisibility() override; | 359 void UpdateBookmarkStarVisibility() override; |
| 356 bool ShowPageActionPopup(const extensions::Extension* extension, | 360 bool ShowPageActionPopup(const extensions::Extension* extension, |
| 357 bool grant_active_tab) override; | 361 bool grant_active_tab) override; |
| 358 void UpdateOpenPDFInReaderPrompt() override; | 362 void UpdateOpenPDFInReaderPrompt() override; |
| 359 void UpdateGeneratedCreditCardView() override; | 363 void UpdateGeneratedCreditCardView() override; |
| 360 void SaveStateToContents(content::WebContents* contents) override; | 364 void SaveStateToContents(content::WebContents* contents) override; |
| 361 const OmniboxView* GetOmniboxView() const override; | 365 const OmniboxView* GetOmniboxView() const override; |
| 362 LocationBarTesting* GetLocationBarForTesting() override; | 366 LocationBarTesting* GetLocationBarForTesting() override; |
| 363 | 367 |
| 364 // LocationBarTesting: | 368 // LocationBarTesting: |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 | 470 |
| 467 // A bubble that shows after successfully generating a new credit card number. | 471 // A bubble that shows after successfully generating a new credit card number. |
| 468 GeneratedCreditCardView* generated_credit_card_view_; | 472 GeneratedCreditCardView* generated_credit_card_view_; |
| 469 | 473 |
| 470 // The icon to open a PDF in Reader. | 474 // The icon to open a PDF in Reader. |
| 471 OpenPDFInReaderView* open_pdf_in_reader_view_; | 475 OpenPDFInReaderView* open_pdf_in_reader_view_; |
| 472 | 476 |
| 473 // The manage passwords icon. | 477 // The manage passwords icon. |
| 474 ManagePasswordsIconView* manage_passwords_icon_view_; | 478 ManagePasswordsIconView* manage_passwords_icon_view_; |
| 475 | 479 |
| 476 // The current page actions. | |
| 477 PageActions page_actions_; | |
| 478 | |
| 479 // The page action icon views. | 480 // The page action icon views. |
| 480 PageActionViews page_action_views_; | 481 PageActionViews page_action_views_; |
| 481 | 482 |
| 482 // The icon for Translate. | 483 // The icon for Translate. |
| 483 TranslateIconView* translate_icon_view_; | 484 TranslateIconView* translate_icon_view_; |
| 484 | 485 |
| 485 // The star. | 486 // The star. |
| 486 StarView* star_view_; | 487 StarView* star_view_; |
| 487 | 488 |
| 488 // The search/go button. | 489 // The search/go button. |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 // The width is always positive. The ending width is the width of the entire | 547 // The width is always positive. The ending width is the width of the entire |
| 547 // omnibox URL. As the show animation runs, the current width gradually moves | 548 // omnibox URL. As the show animation runs, the current width gradually moves |
| 548 // from the width of the hostname to the ending value. | 549 // from the width of the hostname to the ending value. |
| 549 int current_omnibox_width_; | 550 int current_omnibox_width_; |
| 550 int ending_omnibox_width_; | 551 int ending_omnibox_width_; |
| 551 | 552 |
| 552 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 553 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
| 553 }; | 554 }; |
| 554 | 555 |
| 555 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 556 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |