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

Side by Side Diff: ui/message_center/views/notification_button.h

Issue 273173003: Notifications: Retain button hover state during content updates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move to STLDeleteElements. Created 6 years, 7 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 | ui/message_center/views/notification_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_BUTTON_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_BUTTON_H_
6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_BUTTON_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_BUTTON_H_
7 7
8 #include "ui/gfx/image/image_skia.h" 8 #include "ui/gfx/image/image_skia.h"
9 #include "ui/views/controls/button/custom_button.h" 9 #include "ui/views/controls/button/custom_button.h"
10 #include "ui/views/painter.h" 10 #include "ui/views/painter.h"
(...skipping 14 matching lines...) Expand all
25 25
26 void SetIcon(const gfx::ImageSkia& icon); 26 void SetIcon(const gfx::ImageSkia& icon);
27 void SetTitle(const base::string16& title); 27 void SetTitle(const base::string16& title);
28 28
29 // Overridden from views::View: 29 // Overridden from views::View:
30 virtual gfx::Size GetPreferredSize() const OVERRIDE; 30 virtual gfx::Size GetPreferredSize() const OVERRIDE;
31 virtual int GetHeightForWidth(int width) const OVERRIDE; 31 virtual int GetHeightForWidth(int width) const OVERRIDE;
32 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 32 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
33 virtual void OnFocus() OVERRIDE; 33 virtual void OnFocus() OVERRIDE;
34 virtual void OnBlur() OVERRIDE; 34 virtual void OnBlur() OVERRIDE;
35 virtual void ViewHierarchyChanged(
36 const ViewHierarchyChangedDetails& details) OVERRIDE;
35 37
36 // Overridden from views::CustomButton: 38 // Overridden from views::CustomButton:
37 virtual void StateChanged() OVERRIDE; 39 virtual void StateChanged() OVERRIDE;
38 40
39 private: 41 private:
40 views::ImageView* icon_; 42 views::ImageView* icon_;
41 views::Label* title_; 43 views::Label* title_;
42 scoped_ptr<views::Painter> focus_painter_; 44 scoped_ptr<views::Painter> focus_painter_;
43 45
44 DISALLOW_COPY_AND_ASSIGN(NotificationButton); 46 DISALLOW_COPY_AND_ASSIGN(NotificationButton);
45 }; 47 };
46 48
47 } // namespace message_center 49 } // namespace message_center
48 50
49 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_BUTTON_H_ 51 #endif // UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_BUTTON_H_
OLDNEW
« no previous file with comments | « no previous file | ui/message_center/views/notification_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698