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

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

Issue 4154002: New statusbar images for ChromeOS (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
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"
(...skipping 12 matching lines...) Expand all
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 }
31 31
32 protected: 32 protected:
33 // Draws the pressed icon. This is called before DrawIcon if the state is
34 // pressed. Subclasses should override this method if they need to draw a
35 // pressed icon.
36 virtual void DrawPressed(gfx::Canvas* canvas) {}
37
38 // Draws the icon for this status area button on the canvas. 33 // Draws the icon for this status area button on the canvas.
39 // Subclasses should override this method if they need to draw their own icon. 34 // Subclasses should override this method if they need to draw their own icon.
40 // Otherwise, just call SetIcon() and the it will be handled for you. 35 // Otherwise, just call SetIcon() and the it will be handled for you.
41 virtual void DrawIcon(gfx::Canvas* canvas); 36 virtual void DrawIcon(gfx::Canvas* canvas);
42 37
38 // Subclasses should override these methods to return the correct dimensions.
39 virtual int icon_height() { return 24; }
40 virtual int icon_width() { return 23; }
41
43 // True if the button wants to use views::MenuButton drawings. 42 // True if the button wants to use views::MenuButton drawings.
44 bool use_menu_button_paint_; 43 bool use_menu_button_paint_;
45 44
46 // Insets to use for this button. 45 // Insets to use for this button.
47 gfx::Insets insets_; 46 gfx::Insets insets_;
48 47
49 DISALLOW_COPY_AND_ASSIGN(StatusAreaButton); 48 DISALLOW_COPY_AND_ASSIGN(StatusAreaButton);
50 }; 49 };
51 50
52 } // namespace chromeos 51 } // namespace chromeos
53 52
54 #endif // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_ 53 #endif // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/power_menu_button_browsertest.cc ('k') | chrome/browser/chromeos/status/status_area_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698