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

Side by Side Diff: ash/shelf/shelf_widget.h

Issue 115113006: Rename Launcher to Shelf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ShelfTestAPI Created 7 years 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_SHELF_SHELF_WIDGET_H_ 5 #ifndef ASH_SHELF_SHELF_WIDGET_H_
6 #define ASH_SHELF_SHELF_WIDGET_H_ 6 #define ASH_SHELF_SHELF_WIDGET_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/shelf/background_animator.h" 9 #include "ash/shelf/background_animator.h"
10 #include "ash/shelf/shelf_types.h" 10 #include "ash/shelf/shelf_types.h"
11 #include "ui/views/widget/widget.h" 11 #include "ui/views/widget/widget.h"
12 #include "ui/views/widget/widget_observer.h" 12 #include "ui/views/widget/widget_observer.h"
13 13
14 namespace aura { 14 namespace aura {
15 class Window; 15 class Window;
16 } 16 }
17 17
18 namespace ash { 18 namespace ash {
19 class Launcher; 19 class Shelf;
20 20
21 namespace internal { 21 namespace internal {
22 class FocusCycler; 22 class FocusCycler;
23 class StatusAreaWidget; 23 class StatusAreaWidget;
24 class ShelfLayoutManager; 24 class ShelfLayoutManager;
25 class WorkspaceController; 25 class WorkspaceController;
26 } 26 }
27 27
28 class ASH_EXPORT ShelfWidget : public views::Widget, 28 class ASH_EXPORT ShelfWidget : public views::Widget,
29 public views::WidgetObserver { 29 public views::WidgetObserver {
(...skipping 17 matching lines...) Expand all
47 BackgroundAnimatorChangeType change_type); 47 BackgroundAnimatorChangeType change_type);
48 ShelfBackgroundType GetBackgroundType() const; 48 ShelfBackgroundType GetBackgroundType() const;
49 49
50 // Causes shelf items to be slightly dimmed (e.g. when a window is maximized). 50 // Causes shelf items to be slightly dimmed (e.g. when a window is maximized).
51 void SetDimsShelf(bool dimming); 51 void SetDimsShelf(bool dimming);
52 bool GetDimsShelf() const; 52 bool GetDimsShelf() const;
53 53
54 internal::ShelfLayoutManager* shelf_layout_manager() { 54 internal::ShelfLayoutManager* shelf_layout_manager() {
55 return shelf_layout_manager_; 55 return shelf_layout_manager_;
56 } 56 }
57 Launcher* launcher() const { return launcher_.get(); } 57 Shelf* shelf() const { return shelf_.get(); }
58 internal::StatusAreaWidget* status_area_widget() const { 58 internal::StatusAreaWidget* status_area_widget() const {
59 return status_area_widget_; 59 return status_area_widget_;
60 } 60 }
61 61
62 void CreateLauncher(); 62 void CreateShelf();
63 63
64 // Set visibility of the launcher component of the shelf. 64 // Set visibility of the shelf.
65 void SetLauncherVisibility(bool visible); 65 void SetShelfVisibility(bool visible);
66 bool IsLauncherVisible() const; 66 bool IsShelfVisible() const;
67 67
68 // Sets the focus cycler. Also adds the launcher to the cycle. 68 // Sets the focus cycler. Also adds the shelf to the cycle.
69 void SetFocusCycler(internal::FocusCycler* focus_cycler); 69 void SetFocusCycler(internal::FocusCycler* focus_cycler);
70 internal::FocusCycler* GetFocusCycler(); 70 internal::FocusCycler* GetFocusCycler();
71 71
72 // Called by the activation delegate, before the launcher is activated 72 // Called by the activation delegate, before the shelf is activated
73 // when no other windows are visible. 73 // when no other windows are visible.
74 void WillActivateAsFallback() { activating_as_fallback_ = true; } 74 void WillActivateAsFallback() { activating_as_fallback_ = true; }
75 75
76 aura::Window* window_container() { return window_container_; } 76 aura::Window* window_container() { return window_container_; }
77 77
78 // TODO(harrym): Remove when Status Area Widget is a child view. 78 // TODO(harrym): Remove when Status Area Widget is a child view.
79 void ShutdownStatusAreaWidget(); 79 void ShutdownStatusAreaWidget();
80 80
81 // Force the shelf to be presented in an undimmed state. 81 // Force the shelf to be presented in an undimmed state.
82 void ForceUndimming(bool force); 82 void ForceUndimming(bool force);
(...skipping 10 matching lines...) Expand all
93 // the dimmer is inactive. 93 // the dimmer is inactive.
94 gfx::Rect GetDimmerBoundsForTest(); 94 gfx::Rect GetDimmerBoundsForTest();
95 95
96 // Disable dimming animations for running tests. 96 // Disable dimming animations for running tests.
97 void DisableDimmingAnimationsForTest(); 97 void DisableDimmingAnimationsForTest();
98 98
99 private: 99 private:
100 class DelegateView; 100 class DelegateView;
101 101
102 internal::ShelfLayoutManager* shelf_layout_manager_; 102 internal::ShelfLayoutManager* shelf_layout_manager_;
103 scoped_ptr<Launcher> launcher_; 103 scoped_ptr<Shelf> shelf_;
104 internal::StatusAreaWidget* status_area_widget_; 104 internal::StatusAreaWidget* status_area_widget_;
105 105
106 // delegate_view_ is attached to window_container_ and is cleaned up 106 // delegate_view_ is attached to window_container_ and is cleaned up
107 // during CloseChildWindows of the associated RootWindowController. 107 // during CloseChildWindows of the associated RootWindowController.
108 DelegateView* delegate_view_; 108 DelegateView* delegate_view_;
109 internal::BackgroundAnimator background_animator_; 109 internal::BackgroundAnimator background_animator_;
110 bool activating_as_fallback_; 110 bool activating_as_fallback_;
111 aura::Window* window_container_; 111 aura::Window* window_container_;
112 }; 112 };
113 113
114 } // namespace ash 114 } // namespace ash
115 115
116 #endif // ASH_SHELF_SHELF_WIDGET_H_ 116 #endif // ASH_SHELF_SHELF_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698