Chromium Code Reviews| 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 // When called with |visible| = true, displays a semi-transparent overlay over | |
| 80 // the app list (good for hiding the app list when a modal dialog is being | |
| 81 // shown). Call again with |visible| = false to hide. | |
| 82 void ShowAppListOverlay(bool visible); | |
|
tapted
2014/05/21 03:40:57
I'd go for
SetAppListOverlayVisible(bool visible)
sashab
2014/05/22 07:20:21
Good suggestion. Made the comment simpler as well
| |
| 83 | |
| 79 // Returns true if the app list should be centered and in landscape mode. | 84 // Returns true if the app list should be centered and in landscape mode. |
| 80 bool ShouldCenterWindow() const; | 85 bool ShouldCenterWindow() const; |
| 81 | 86 |
| 82 // Overridden from views::View: | 87 // Overridden from views::View: |
| 83 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 88 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
| 84 virtual void Paint(gfx::Canvas* canvas, | 89 virtual void Paint(gfx::Canvas* canvas, |
| 85 const views::CullSet& cull_set) OVERRIDE; | 90 const views::CullSet& cull_set) OVERRIDE; |
| 86 virtual void OnThemeChanged() OVERRIDE; | 91 virtual void OnThemeChanged() OVERRIDE; |
| 87 | 92 |
| 88 // WidgetDelegate overrides: | 93 // WidgetDelegate overrides: |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 142 SpeechRecognitionState new_state) OVERRIDE; | 147 SpeechRecognitionState new_state) OVERRIDE; |
| 143 | 148 |
| 144 SigninDelegate* GetSigninDelegate(); | 149 SigninDelegate* GetSigninDelegate(); |
| 145 | 150 |
| 146 scoped_ptr<AppListViewDelegate> delegate_; | 151 scoped_ptr<AppListViewDelegate> delegate_; |
| 147 | 152 |
| 148 AppListMainView* app_list_main_view_; | 153 AppListMainView* app_list_main_view_; |
| 149 SigninView* signin_view_; | 154 SigninView* signin_view_; |
| 150 SpeechView* speech_view_; | 155 SpeechView* speech_view_; |
| 151 | 156 |
| 157 // A semi-transparent white overlay that covers the app list while dialogs are | |
| 158 // open. | |
| 159 views::View* overlay_view_; | |
| 160 | |
| 152 ObserverList<AppListViewObserver> observers_; | 161 ObserverList<AppListViewObserver> observers_; |
| 153 scoped_ptr<HideViewAnimationObserver> animation_observer_; | 162 scoped_ptr<HideViewAnimationObserver> animation_observer_; |
| 154 | 163 |
| 155 // For UMA and testing. If non-null, triggered when the app list is painted. | 164 // For UMA and testing. If non-null, triggered when the app list is painted. |
| 156 base::Closure next_paint_callback_; | 165 base::Closure next_paint_callback_; |
| 157 | 166 |
| 158 DISALLOW_COPY_AND_ASSIGN(AppListView); | 167 DISALLOW_COPY_AND_ASSIGN(AppListView); |
| 159 }; | 168 }; |
| 160 | 169 |
| 161 } // namespace app_list | 170 } // namespace app_list |
| 162 | 171 |
| 163 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 172 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
| OLD | NEW |