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

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: Comments from pkasting. 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 PageActions& page_actions);
Mike Wittman 2014/12/23 01:21:56 make const?
erikchen 2014/12/23 01:29:36 Done.
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
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; 359 void RefreshPageActions() override;
355 void UpdateBookmarkStarVisibility() override; 360 void UpdateBookmarkStarVisibility() override;
356 bool ShowPageActionPopup(const extensions::Extension* extension, 361 bool ShowPageActionPopup(const extensions::Extension* extension,
357 bool grant_active_tab) override; 362 bool grant_active_tab) override;
358 void UpdateOpenPDFInReaderPrompt() override; 363 void UpdateOpenPDFInReaderPrompt() override;
359 void UpdateGeneratedCreditCardView() override; 364 void UpdateGeneratedCreditCardView() override;
360 void SaveStateToContents(content::WebContents* contents) override; 365 void SaveStateToContents(content::WebContents* contents) override;
361 const OmniboxView* GetOmniboxView() const override; 366 const OmniboxView* GetOmniboxView() const override;
362 LocationBarTesting* GetLocationBarForTesting() override; 367 LocationBarTesting* GetLocationBarForTesting() override;
363 368
364 // LocationBarTesting: 369 // LocationBarTesting:
(...skipping 101 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