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/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "ui/app_list/app_list_export.h" | 10 #include "ui/app_list/app_list_export.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 ApplicationDragAndDropHost* drag_and_drop_host); | 68 ApplicationDragAndDropHost* drag_and_drop_host); |
69 | 69 |
70 // Shows the UI when there are no pending icon loads. Otherwise, starts a | 70 // Shows the UI when there are no pending icon loads. Otherwise, starts a |
71 // timer to show the UI when a maximum allowed wait time has expired. | 71 // timer to show the UI when a maximum allowed wait time has expired. |
72 void ShowWhenReady(); | 72 void ShowWhenReady(); |
73 | 73 |
74 void Close(); | 74 void Close(); |
75 | 75 |
76 void UpdateBounds(); | 76 void UpdateBounds(); |
77 | 77 |
| 78 // When called with |visible| = true, displays a semi-transparent overlay over |
| 79 // the app list (good for hiding the app list when a modal dialog is being |
| 80 // shown). Call again with |visible| = false to hide. |
| 81 void ShowAppListOverlay(bool visible); |
| 82 |
78 // 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. |
79 bool ShouldCenterWindow() const; | 84 bool ShouldCenterWindow() const; |
80 | 85 |
81 // Overridden from views::View: | 86 // Overridden from views::View: |
82 virtual gfx::Size GetPreferredSize() OVERRIDE; | 87 virtual gfx::Size GetPreferredSize() OVERRIDE; |
83 virtual void Paint(gfx::Canvas* canvas) OVERRIDE; | 88 virtual void Paint(gfx::Canvas* canvas) OVERRIDE; |
84 virtual void OnThemeChanged() OVERRIDE; | 89 virtual void OnThemeChanged() OVERRIDE; |
85 | 90 |
86 // WidgetDelegate overrides: | 91 // WidgetDelegate overrides: |
87 virtual bool ShouldHandleSystemCommands() const OVERRIDE; | 92 virtual bool ShouldHandleSystemCommands() const OVERRIDE; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 SpeechRecognitionState new_state) OVERRIDE; | 145 SpeechRecognitionState new_state) OVERRIDE; |
141 | 146 |
142 SigninDelegate* GetSigninDelegate(); | 147 SigninDelegate* GetSigninDelegate(); |
143 | 148 |
144 scoped_ptr<AppListViewDelegate> delegate_; | 149 scoped_ptr<AppListViewDelegate> delegate_; |
145 | 150 |
146 AppListMainView* app_list_main_view_; | 151 AppListMainView* app_list_main_view_; |
147 SigninView* signin_view_; | 152 SigninView* signin_view_; |
148 SpeechView* speech_view_; | 153 SpeechView* speech_view_; |
149 | 154 |
| 155 // A semi-transparent white overlay that covers the app list while dialogs are |
| 156 // open. NULL if it hasn't been created yet. |
| 157 views::View* overlay_view_; |
| 158 |
150 ObserverList<AppListViewObserver> observers_; | 159 ObserverList<AppListViewObserver> observers_; |
151 scoped_ptr<HideViewAnimationObserver> animation_observer_; | 160 scoped_ptr<HideViewAnimationObserver> animation_observer_; |
152 | 161 |
153 DISALLOW_COPY_AND_ASSIGN(AppListView); | 162 DISALLOW_COPY_AND_ASSIGN(AppListView); |
154 }; | 163 }; |
155 | 164 |
156 } // namespace app_list | 165 } // namespace app_list |
157 | 166 |
158 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 167 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
OLD | NEW |