OLD | NEW |
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 UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
6 #define UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 ApplicationDragAndDropHost* drag_and_drop_host); | 69 ApplicationDragAndDropHost* drag_and_drop_host); |
70 | 70 |
71 // Shows the UI when there are no pending icon loads. Otherwise, starts a | 71 // Shows the UI when there are no pending icon loads. Otherwise, starts a |
72 // timer to show the UI when a maximum allowed wait time has expired. | 72 // timer to show the UI when a maximum allowed wait time has expired. |
73 void ShowWhenReady(); | 73 void ShowWhenReady(); |
74 | 74 |
75 void Close(); | 75 void Close(); |
76 | 76 |
77 void UpdateBounds(); | 77 void UpdateBounds(); |
78 | 78 |
| 79 // Enables/disables a semi-transparent overlay over the app list (good for |
| 80 // hiding the app list when a modal dialog is being shown). |
| 81 void SetAppListOverlayVisible(bool visible); |
| 82 |
79 // Returns true if the app list should be centered and in landscape mode. | 83 // Returns true if the app list should be centered and in landscape mode. |
80 bool ShouldCenterWindow() const; | 84 bool ShouldCenterWindow() const; |
81 | 85 |
82 // Overridden from views::View: | 86 // Overridden from views::View: |
83 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 87 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
84 virtual void Paint(gfx::Canvas* canvas, | 88 virtual void Paint(gfx::Canvas* canvas, |
85 const views::CullSet& cull_set) OVERRIDE; | 89 const views::CullSet& cull_set) OVERRIDE; |
86 virtual void OnThemeChanged() OVERRIDE; | 90 virtual void OnThemeChanged() OVERRIDE; |
87 | 91 |
88 // WidgetDelegate overrides: | 92 // WidgetDelegate overrides: |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 SpeechRecognitionState new_state) OVERRIDE; | 146 SpeechRecognitionState new_state) OVERRIDE; |
143 | 147 |
144 SigninDelegate* GetSigninDelegate(); | 148 SigninDelegate* GetSigninDelegate(); |
145 | 149 |
146 scoped_ptr<AppListViewDelegate> delegate_; | 150 scoped_ptr<AppListViewDelegate> delegate_; |
147 | 151 |
148 AppListMainView* app_list_main_view_; | 152 AppListMainView* app_list_main_view_; |
149 SigninView* signin_view_; | 153 SigninView* signin_view_; |
150 SpeechView* speech_view_; | 154 SpeechView* speech_view_; |
151 | 155 |
| 156 // A semi-transparent white overlay that covers the app list while dialogs are |
| 157 // open. |
| 158 views::View* overlay_view_; |
| 159 |
152 ObserverList<AppListViewObserver> observers_; | 160 ObserverList<AppListViewObserver> observers_; |
153 scoped_ptr<HideViewAnimationObserver> animation_observer_; | 161 scoped_ptr<HideViewAnimationObserver> animation_observer_; |
154 | 162 |
155 // For UMA and testing. If non-null, triggered when the app list is painted. | 163 // For UMA and testing. If non-null, triggered when the app list is painted. |
156 base::Closure next_paint_callback_; | 164 base::Closure next_paint_callback_; |
157 | 165 |
158 DISALLOW_COPY_AND_ASSIGN(AppListView); | 166 DISALLOW_COPY_AND_ASSIGN(AppListView); |
159 }; | 167 }; |
160 | 168 |
161 } // namespace app_list | 169 } // namespace app_list |
162 | 170 |
163 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 171 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
OLD | NEW |