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

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

Issue 9808026: Layout panels on top of their launcher icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ununsed constanrs removed Created 8 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
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_LAUNCHER_VIEW_H_ 5 #ifndef ASH_LAUNCHER_LAUNCHER_VIEW_H_
6 #define ASH_LAUNCHER_LAUNCHER_VIEW_H_ 6 #define ASH_LAUNCHER_LAUNCHER_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "ash/launcher/launcher_button_host.h" 11 #include "ash/launcher/launcher_button_host.h"
12 #include "ash/launcher/launcher_model_observer.h" 12 #include "ash/launcher/launcher_model_observer.h"
13 #include "base/observer_list.h"
13 #include "ui/views/context_menu_controller.h" 14 #include "ui/views/context_menu_controller.h"
14 #include "ui/views/controls/button/button.h" 15 #include "ui/views/controls/button/button.h"
15 #include "ui/views/view.h" 16 #include "ui/views/view.h"
16 17
17 namespace views { 18 namespace views {
18 class BoundsAnimator; 19 class BoundsAnimator;
19 class ImageButton; 20 class ImageButton;
20 class MenuRunner; 21 class MenuRunner;
21 } 22 }
22 23
23 namespace ash { 24 namespace ash {
24 25
25 class LauncherDelegate; 26 class LauncherDelegate;
26 struct LauncherItem; 27 struct LauncherItem;
28 class LauncherIconsObserver;
27 class LauncherModel; 29 class LauncherModel;
28 class LauncherWindowCycler; 30 class LauncherWindowCycler;
29 class ViewModel; 31 class ViewModel;
30 32
31 namespace internal { 33 namespace internal {
32 34
33 class LauncherButton; 35 class LauncherButton;
34 36
35 class ASH_EXPORT LauncherView : public views::View, 37 class ASH_EXPORT LauncherView : public views::View,
36 public LauncherModelObserver, 38 public LauncherModelObserver,
(...skipping 20 matching lines...) Expand all
57 59
58 LauncherView(LauncherModel* model, LauncherDelegate* delegate); 60 LauncherView(LauncherModel* model, LauncherDelegate* delegate);
59 virtual ~LauncherView(); 61 virtual ~LauncherView();
60 62
61 void Init(); 63 void Init();
62 64
63 // Returns the ideal bounds of the specified item, or an empty rect if id 65 // Returns the ideal bounds of the specified item, or an empty rect if id
64 // isn't know. 66 // isn't know.
65 gfx::Rect GetIdealBoundsOfItemIcon(LauncherID id); 67 gfx::Rect GetIdealBoundsOfItemIcon(LauncherID id);
66 68
69 void AddIconsObserver(LauncherIconsObserver* observer);
70 void RemoveIconsObserver(LauncherIconsObserver* observer);
71
67 private: 72 private:
68 class FadeOutAnimationDelegate; 73 class FadeOutAnimationDelegate;
69 class StartFadeAnimationDelegate; 74 class StartFadeAnimationDelegate;
70 75
71 struct IdealBounds { 76 struct IdealBounds {
72 gfx::Rect overflow_bounds; 77 gfx::Rect overflow_bounds;
73 }; 78 };
74 79
75 // Sets the bounds of each view to its ideal bounds. 80 // Sets the bounds of each view to its ideal bounds.
76 void LayoutToIdealBounds(); 81 void LayoutToIdealBounds();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 183
179 #if !defined(OS_MACOSX) 184 #if !defined(OS_MACOSX)
180 scoped_ptr<views::MenuRunner> overflow_menu_runner_; 185 scoped_ptr<views::MenuRunner> overflow_menu_runner_;
181 186
182 scoped_ptr<views::MenuRunner> launcher_menu_runner_; 187 scoped_ptr<views::MenuRunner> launcher_menu_runner_;
183 #endif 188 #endif
184 189
185 // Used to handle cycling among windows. 190 // Used to handle cycling among windows.
186 scoped_ptr<LauncherWindowCycler> cycler_; 191 scoped_ptr<LauncherWindowCycler> cycler_;
187 192
193 ObserverList<LauncherIconsObserver> observers_;
194
188 DISALLOW_COPY_AND_ASSIGN(LauncherView); 195 DISALLOW_COPY_AND_ASSIGN(LauncherView);
189 }; 196 };
190 197
191 } // namespace internal 198 } // namespace internal
192 } // namespace ash 199 } // namespace ash
193 200
194 #endif // ASH_LAUNCHER_LAUNCHER_VIEW_H_ 201 #endif // ASH_LAUNCHER_LAUNCHER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698