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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_view.h

Issue 395193003: Create a cross-platform helper class for badging the wrench menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 5 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/toolbar/toolbar_view.h
===================================================================
--- chrome/browser/ui/views/toolbar/toolbar_view.h (revision 283822)
+++ chrome/browser/ui/views/toolbar/toolbar_view.h (working copy)
@@ -13,6 +13,7 @@
#include "base/prefs/pref_member.h"
#include "chrome/browser/command_observer.h"
#include "chrome/browser/ui/toolbar/back_forward_menu_model.h"
+#include "chrome/browser/ui/toolbar/wrench_menu_badge_controller.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/views/accessible_pane_view.h"
@@ -49,7 +50,8 @@
public CommandObserver,
public views::ButtonListener,
public views::WidgetObserver,
- public views::ViewTargeterDelegate {
+ public views::ViewTargeterDelegate,
+ public WrenchMenuBadgeController::Delegate {
public:
// The view class name.
static const char kViewClassName[];
@@ -192,15 +194,11 @@
virtual bool DoesIntersectRect(const views::View* target,
const gfx::Rect& rect) const OVERRIDE;
- // Returns true if we should show the upgrade recommended dot.
- bool ShouldShowUpgradeRecommended();
+ // WrenchMenuBadgeController::Delegate:
+ virtual void UpdateBadgeSeverity(WrenchMenuBadgeController::BadgeType type,
+ WrenchIconPainter::Severity severity,
+ bool animate) OVERRIDE;
- // Returns true if we should show the background page badge.
- bool ShouldShowBackgroundPageBadge();
-
- // Returns true if we should show the warning for incompatible software.
- bool ShouldShowIncompatibilityWarning();
-
// Returns the number of pixels above the location bar in non-normal display.
int PopupTopSpacing() const;
@@ -221,12 +219,6 @@
// |auto_update_enabled| is set to true when auto-upate is on.
void ShowOutdatedInstallNotification(bool auto_update_enabled);
- // Updates the badge and the accessible name of the app menu (Wrench).
- void UpdateAppMenuState();
-
- // Updates the severity level on the wrench menu button.
- void UpdateWrenchButtonSeverity();
-
void OnShowHomeButtonChanged();
int content_shadow_height() const;
@@ -241,6 +233,8 @@
WrenchToolbarButton* app_menu_;
Browser* browser_;
+ WrenchMenuBadgeController badge_controller_;
+
// Controls whether or not a home button should be shown on the toolbar.
BooleanPrefMember show_home_button_;

Powered by Google App Engine
This is Rietveld 408576698