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

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

Issue 10056001: chromeos: Remove old status-area related code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUBBLE_H_
6 #define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUBBLE_H_
7 #pragma once
8
9 #include "base/timer.h"
10 #include "ui/views/widget/widget.h"
11
12 namespace views {
13 class Label;
14 }
15
16 namespace chromeos {
17
18 // StatusAreaBubbleContentView is used as the content view of
19 // StatusAreaBubbleController.
20 // It can be also used to show a bubble-like menu under the status area.
21 class StatusAreaBubbleContentView : public views::View {
22 public:
23 // |icon_view| is used to show icon, |this| will take its ownership.
24 StatusAreaBubbleContentView(views::View* icon_view, const string16& message);
25 virtual ~StatusAreaBubbleContentView();
26
27 string16 GetMessage() const;
28 void SetMessage(const string16& message);
29
30 views::View* icon_view() const { return icon_view_; }
31
32 // views::View override
33 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
34
35 private:
36 views::View* icon_view_;
37 views::Label* message_view_;
38
39 DISALLOW_COPY_AND_ASSIGN(StatusAreaBubbleContentView);
40 };
41
42 // StatusAreaBubbleController is used to show a bubble under the status area
43 class StatusAreaBubbleController : public views::Widget::Observer {
44 public:
45 virtual ~StatusAreaBubbleController();
46
47 // Show bubble under |view| for a while.
48 static StatusAreaBubbleController* ShowBubbleUnderViewForAWhile(
49 views::View* view,
50 StatusAreaBubbleContentView* content);
51
52 // views::Widget::Observer override
53 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE;
54
55 bool IsBubbleShown() const;
56 void HideBubble();
57
58 private:
59 class StatusAreaBubbleDelegateView;
60
61 StatusAreaBubbleController();
62
63 StatusAreaBubbleDelegateView* bubble_;
64 // A timer to hide this bubble.
65 base::OneShotTimer<StatusAreaBubbleController> timer_;
66
67 DISALLOW_COPY_AND_ASSIGN(StatusAreaBubbleController);
68 };
69
70 } // namespace chromeos
71
72 #endif // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUBBLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/power_menu_button.cc ('k') | chrome/browser/chromeos/status/status_area_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698