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

Side by Side Diff: chrome/browser/chromeos/status/status_area_button.h

Issue 6635008: cros: Fix PaintButton override. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/status_area_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_
6 #define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_ 6 #define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_
7 #pragma once 7 #pragma once
8 8
9 #include "views/controls/button/menu_button.h" 9 #include "views/controls/button/menu_button.h"
10 #include "views/controls/menu/view_menu_delegate.h" 10 #include "views/controls/menu/view_menu_delegate.h"
11 11
12 namespace chromeos { 12 namespace chromeos {
13 13
14 // Button to be used to represent status and allow menus to be popped up. 14 // Button to be used to represent status and allow menus to be popped up.
15 // Shows current button state by drawing a border around the current icon. 15 // Shows current button state by drawing a border around the current icon.
16 class StatusAreaButton : public views::MenuButton { 16 class StatusAreaButton : public views::MenuButton {
17 public: 17 public:
18 explicit StatusAreaButton(views::ViewMenuDelegate* menu_delegate); 18 explicit StatusAreaButton(views::ViewMenuDelegate* menu_delegate);
19 virtual ~StatusAreaButton() {} 19 virtual ~StatusAreaButton() {}
20 virtual void OnPaint(gfx::Canvas* canvas, bool for_drag); 20 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode);
21 virtual gfx::Size GetPreferredSize(); 21 virtual gfx::Size GetPreferredSize();
22 virtual gfx::Insets GetInsets() const; 22 virtual gfx::Insets GetInsets() const;
23 23
24 // Overrides TextButton's SetText to clear max text size before seting new 24 // Overrides TextButton's SetText to clear max text size before seting new
25 // text content so that the button size would fit the new text size. 25 // text content so that the button size would fit the new text size.
26 virtual void SetText(const std::wstring& text); 26 virtual void SetText(const std::wstring& text);
27 27
28 void set_use_menu_button_paint(bool use_menu_button_paint) { 28 void set_use_menu_button_paint(bool use_menu_button_paint) {
29 use_menu_button_paint_ = use_menu_button_paint; 29 use_menu_button_paint_ = use_menu_button_paint;
30 } 30 }
(...skipping 25 matching lines...) Expand all
56 // IsEnabled state, so that when IsEnabled is true, this can still 56 // IsEnabled state, so that when IsEnabled is true, this can still
57 // be false, and vice versa. 57 // be false, and vice versa.
58 bool active_; 58 bool active_;
59 59
60 DISALLOW_COPY_AND_ASSIGN(StatusAreaButton); 60 DISALLOW_COPY_AND_ASSIGN(StatusAreaButton);
61 }; 61 };
62 62
63 } // namespace chromeos 63 } // namespace chromeos
64 64
65 #endif // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_ 65 #endif // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/status_area_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698