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

Unified Diff: chrome/browser/chromeos/status/status_area_button.h

Issue 6904160: Implement new gray mock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed power test Created 9 years, 8 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/chromeos/status/status_area_button.h
diff --git a/chrome/browser/chromeos/status/status_area_button.h b/chrome/browser/chromeos/status/status_area_button.h
index d4c8b6715ae9025f4bd9577f4b83db8fe29148dc..80e8279be86e93552ebb206c265f8df9282293dd 100644
--- a/chrome/browser/chromeos/status/status_area_button.h
+++ b/chrome/browser/chromeos/status/status_area_button.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_
#pragma once
+#include "chrome/browser/chromeos/status/status_area_host.h"
#include "views/controls/button/menu_button.h"
#include "views/controls/menu/view_menu_delegate.h"
@@ -15,11 +16,10 @@ namespace chromeos {
// Shows current button state by drawing a border around the current icon.
class StatusAreaButton : public views::MenuButton {
public:
- explicit StatusAreaButton(views::ViewMenuDelegate* menu_delegate);
+ explicit StatusAreaButton(
+ StatusAreaHost* host, views::ViewMenuDelegate* menu_delegate);
sky 2011/05/02 14:26:27 each param on its own line.
virtual ~StatusAreaButton() {}
virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode);
- virtual gfx::Size GetPreferredSize();
- virtual gfx::Insets GetInsets() const;
// Overrides TextButton's SetText to clear max text size before seting new
// text content so that the button size would fit the new text size.
@@ -30,7 +30,12 @@ class StatusAreaButton : public views::MenuButton {
}
// views::MenuButton overrides.
- virtual bool Activate();
+ virtual bool Activate() OVERRIDE;
+
+ // View overrides.
+ virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual gfx::Insets GetInsets() const OVERRIDE;
+ virtual void OnThemeChanged() OVERRIDE;
// Controls whether or not this status area button is able to be pressed.
void set_active(bool active) { active_ = active; }
@@ -57,6 +62,12 @@ class StatusAreaButton : public views::MenuButton {
// be false, and vice versa.
bool active_;
+ // The status area host,
+ StatusAreaHost* host_;
+
+ private:
+ void UpdateTextStyle();
+
DISALLOW_COPY_AND_ASSIGN(StatusAreaButton);
};

Powered by Google App Engine
This is Rietveld 408576698