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

Side by Side Diff: ash/launcher/overflow_bubble.h

Issue 10834079: views: Extract Widget observer into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | ash/launcher/overflow_bubble.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 ASH_LAUNCHER_OVERFLOW_BUBBLE_H_ 5 #ifndef ASH_LAUNCHER_OVERFLOW_BUBBLE_H_
6 #define ASH_LAUNCHER_OVERFLOW_BUBBLE_H_ 6 #define ASH_LAUNCHER_OVERFLOW_BUBBLE_H_
7 7
8 #include "ash/wm/shelf_types.h" 8 #include "ash/wm/shelf_types.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "ui/views/widget/widget.h" 11 #include "ui/views/widget/widget_observer.h"
12 12
13 namespace views { 13 namespace views {
14 class View; 14 class View;
15 } 15 }
16 16
17 namespace ash { 17 namespace ash {
18 18
19 class LauncherDelegate; 19 class LauncherDelegate;
20 class LauncherModel; 20 class LauncherModel;
21 21
22 namespace internal { 22 namespace internal {
23 23
24 class LauncherView; 24 class LauncherView;
25 25
26 // OverflowBubble displays an overflow bubble. 26 // OverflowBubble displays an overflow bubble.
27 class OverflowBubble : public views::Widget::Observer { 27 class OverflowBubble : public views::WidgetObserver {
28 public: 28 public:
29 OverflowBubble(); 29 OverflowBubble();
30 virtual ~OverflowBubble(); 30 virtual ~OverflowBubble();
31 31
32 void Show(LauncherDelegate* delegate, 32 void Show(LauncherDelegate* delegate,
33 LauncherModel* model, 33 LauncherModel* model,
34 views::View* anchor, 34 views::View* anchor,
35 ShelfAlignment shelf_alignment, 35 ShelfAlignment shelf_alignment,
36 int overflow_start_index); 36 int overflow_start_index);
37 37
38 void Hide(); 38 void Hide();
39 39
40 bool IsShowing() const { return !!bubble_; } 40 bool IsShowing() const { return !!bubble_; }
41 41
42 private: 42 private:
43 // views::Widget::Observer overrides: 43 // Overridden from views::WidgetObserver:
44 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; 44 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE;
45 45
46 views::View* bubble_; // Owned by views hierarchy. 46 views::View* bubble_; // Owned by views hierarchy.
47 47
48 DISALLOW_COPY_AND_ASSIGN(OverflowBubble); 48 DISALLOW_COPY_AND_ASSIGN(OverflowBubble);
49 }; 49 };
50 50
51 } // namespace internal 51 } // namespace internal
52 } // namespace ash 52 } // namespace ash
53 53
54 #endif // ASH_LAUNCHER_OVERFLOW_BUBBLE_H_ 54 #endif // ASH_LAUNCHER_OVERFLOW_BUBBLE_H_
OLDNEW
« no previous file with comments | « no previous file | ash/launcher/overflow_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698