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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 | 371 |
372 // Returns the thickness of any visible left and right edge, in pixels. | 372 // Returns the thickness of any visible left and right edge, in pixels. |
373 int GetHorizontalEdgeThickness() const; | 373 int GetHorizontalEdgeThickness() const; |
374 | 374 |
375 // The same, but for the top and bottom edges. | 375 // The same, but for the top and bottom edges. |
376 int vertical_edge_thickness() const { | 376 int vertical_edge_thickness() const { |
377 return is_popup_mode_ ? kPopupEdgeThickness : kNormalEdgeThickness; | 377 return is_popup_mode_ ? kPopupEdgeThickness : kNormalEdgeThickness; |
378 } | 378 } |
379 | 379 |
380 // Updates the visibility state of the Content Blocked icons to reflect what | 380 // Updates the visibility state of the Content Blocked icons to reflect what |
381 // is actually blocked on the current page. | 381 // is actually blocked on the current page. Returns true if the visibility |
382 void RefreshContentSettingViews(); | 382 // of at least one of the views in |content_setting_views_| changed. |
| 383 bool RefreshContentSettingViews(); |
383 | 384 |
384 // Deletes all page action views that we have created. | 385 // Deletes all page action views that we have created. |
385 void DeletePageActionViews(); | 386 void DeletePageActionViews(); |
386 | 387 |
387 // Updates the views for the Page Actions, to reflect state changes for | 388 // Updates the views for the Page Actions, to reflect state changes for |
388 // PageActions. | 389 // PageActions. Returns true if the visibility of a PageActionWithBadgeView |
389 void RefreshPageActionViews(); | 390 // changed, or PageActionWithBadgeView were created/destroyed. |
| 391 bool RefreshPageActionViews(); |
390 | 392 |
391 // Returns the number of scripts currently running on the page. | 393 // Returns the number of scripts currently running on the page. |
392 size_t ScriptBubbleScriptsRunning(); | 394 size_t ScriptBubbleScriptsRunning(); |
393 | 395 |
394 // Updates the Script Bubble Icon, to reflect the number of content scripts | 396 // Updates the Script Bubble Icon, to reflect the number of content scripts |
395 // running on the page. | 397 // running on the page. Returns true if the visibility of the bubble changed. |
396 void RefreshScriptBubble(); | 398 bool RefreshScriptBubble(); |
397 | 399 |
398 // Updates the view for the zoom icon based on the current tab's zoom. | 400 // Updates the view for the zoom icon based on the current tab's zoom. Returns |
399 void RefreshZoomView(); | 401 // true if the visibility of the view changed. |
| 402 bool RefreshZoomView(); |
400 | 403 |
401 // Updates the Translate icon based on the current tab's Translate status. | 404 // Updates the Translate icon based on the current tab's Translate status. |
402 void RefreshTranslateIcon(); | 405 void RefreshTranslateIcon(); |
403 | 406 |
404 // Sets the visibility of view to new_vis. | 407 // Sets the visibility of view to new_vis. |
405 void ToggleVisibility(bool new_vis, views::View* view); | 408 void ToggleVisibility(bool new_vis, views::View* view); |
406 | 409 |
407 void RefreshManagePasswordsIconView(); | 410 // Updates |manage_passwords_icon_view_|. Returns true if visibility changed. |
| 411 bool RefreshManagePasswordsIconView(); |
408 | 412 |
409 // Shows the manage passwords bubble if there is a savable password. | 413 // Shows the manage passwords bubble if there is a savable password. |
410 void ShowManagePasswordsBubbleIfNeeded(); | 414 void ShowManagePasswordsBubbleIfNeeded(); |
411 | 415 |
412 #if !defined(USE_AURA) | 416 #if !defined(USE_AURA) |
413 // Helper for the Mouse event handlers that does all the real work. | 417 // Helper for the Mouse event handlers that does all the real work. |
414 void OnMouseEvent(const ui::MouseEvent& event, UINT msg); | 418 void OnMouseEvent(const ui::MouseEvent& event, UINT msg); |
415 #endif | 419 #endif |
416 | 420 |
417 // Returns true if the suggest text is valid. | 421 // Returns true if the suggest text is valid. |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 // Used to register for notifications received by NotificationObserver. | 539 // Used to register for notifications received by NotificationObserver. |
536 content::NotificationRegistrar registrar_; | 540 content::NotificationRegistrar registrar_; |
537 | 541 |
538 // Used to bind callback functions to this object. | 542 // Used to bind callback functions to this object. |
539 base::WeakPtrFactory<LocationBarView> weak_ptr_factory_; | 543 base::WeakPtrFactory<LocationBarView> weak_ptr_factory_; |
540 | 544 |
541 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 545 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
542 }; | 546 }; |
543 | 547 |
544 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 548 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
OLD | NEW |