Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(458)

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.h

Issue 789763004: Fix disappearing page actions bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Significant clean up. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 std::vector<ExtensionAction*>& page_actions);
Peter Kasting 2014/12/23 00:20:05 Nit: Is there a typedef for this type?
erikchen 2014/12/23 00:55:03 Yes. Changed to use the typedef.
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 471
467 // A bubble that shows after successfully generating a new credit card number. 472 // A bubble that shows after successfully generating a new credit card number.
468 GeneratedCreditCardView* generated_credit_card_view_; 473 GeneratedCreditCardView* generated_credit_card_view_;
469 474
470 // The icon to open a PDF in Reader. 475 // The icon to open a PDF in Reader.
471 OpenPDFInReaderView* open_pdf_in_reader_view_; 476 OpenPDFInReaderView* open_pdf_in_reader_view_;
472 477
473 // The manage passwords icon. 478 // The manage passwords icon.
474 ManagePasswordsIconView* manage_passwords_icon_view_; 479 ManagePasswordsIconView* manage_passwords_icon_view_;
475 480
476 // The current page actions.
477 PageActions page_actions_;
478
479 // The page action icon views. 481 // The page action icon views.
480 PageActionViews page_action_views_; 482 PageActionViews page_action_views_;
481 483
482 // The icon for Translate. 484 // The icon for Translate.
483 TranslateIconView* translate_icon_view_; 485 TranslateIconView* translate_icon_view_;
484 486
485 // The star. 487 // The star.
486 StarView* star_view_; 488 StarView* star_view_;
487 489
488 // The search/go button. 490 // The search/go button.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 // The width is always positive. The ending width is the width of the entire 548 // 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 549 // omnibox URL. As the show animation runs, the current width gradually moves
548 // from the width of the hostname to the ending value. 550 // from the width of the hostname to the ending value.
549 int current_omnibox_width_; 551 int current_omnibox_width_;
550 int ending_omnibox_width_; 552 int ending_omnibox_width_;
551 553
552 DISALLOW_COPY_AND_ASSIGN(LocationBarView); 554 DISALLOW_COPY_AND_ASSIGN(LocationBarView);
553 }; 555 };
554 556
555 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 557 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698