| 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 12 matching lines...) Expand all Loading... |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace app_list { | 25 namespace app_list { |
| 26 class ApplicationDragAndDropHost; | 26 class ApplicationDragAndDropHost; |
| 27 class AppListMainView; | 27 class AppListMainView; |
| 28 class AppListModel; | 28 class AppListModel; |
| 29 class AppListViewDelegate; | 29 class AppListViewDelegate; |
| 30 class AppListViewObserver; | 30 class AppListViewObserver; |
| 31 class HideViewAnimationObserver; | 31 class HideViewAnimationObserver; |
| 32 class PaginationModel; | 32 class PaginationModel; |
| 33 class SigninDelegate; | |
| 34 class SigninView; | |
| 35 class SpeechView; | 33 class SpeechView; |
| 36 | 34 |
| 37 // AppListView is the top-level view and controller of app list UI. It creates | 35 // AppListView is the top-level view and controller of app list UI. It creates |
| 38 // and hosts a AppsGridView and passes AppListModel to it for display. | 36 // and hosts a AppsGridView and passes AppListModel to it for display. |
| 39 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView, | 37 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView, |
| 40 public AppListViewDelegateObserver, | 38 public AppListViewDelegateObserver, |
| 41 public SpeechUIModelObserver { | 39 public SpeechUIModelObserver { |
| 42 public: | 40 public: |
| 43 // Takes ownership of |delegate|. | 41 // Takes ownership of |delegate|. |
| 44 explicit AppListView(AppListViewDelegate* delegate); | 42 explicit AppListView(AppListViewDelegate* delegate); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; | 142 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; |
| 145 virtual void OnWidgetVisibilityChanged( | 143 virtual void OnWidgetVisibilityChanged( |
| 146 views::Widget* widget, bool visible) OVERRIDE; | 144 views::Widget* widget, bool visible) OVERRIDE; |
| 147 virtual void OnWidgetActivationChanged( | 145 virtual void OnWidgetActivationChanged( |
| 148 views::Widget* widget, bool active) OVERRIDE; | 146 views::Widget* widget, bool active) OVERRIDE; |
| 149 | 147 |
| 150 // Overridden from SpeechUIModelObserver: | 148 // Overridden from SpeechUIModelObserver: |
| 151 virtual void OnSpeechRecognitionStateChanged( | 149 virtual void OnSpeechRecognitionStateChanged( |
| 152 SpeechRecognitionState new_state) OVERRIDE; | 150 SpeechRecognitionState new_state) OVERRIDE; |
| 153 | 151 |
| 154 SigninDelegate* GetSigninDelegate(); | |
| 155 | |
| 156 scoped_ptr<AppListViewDelegate> delegate_; | 152 scoped_ptr<AppListViewDelegate> delegate_; |
| 157 | 153 |
| 158 AppListMainView* app_list_main_view_; | 154 AppListMainView* app_list_main_view_; |
| 159 SigninView* signin_view_; | |
| 160 SpeechView* speech_view_; | 155 SpeechView* speech_view_; |
| 161 | 156 |
| 162 // A semi-transparent white overlay that covers the app list while dialogs are | 157 // A semi-transparent white overlay that covers the app list while dialogs are |
| 163 // open. | 158 // open. |
| 164 views::View* overlay_view_; | 159 views::View* overlay_view_; |
| 165 | 160 |
| 166 ObserverList<AppListViewObserver> observers_; | 161 ObserverList<AppListViewObserver> observers_; |
| 167 scoped_ptr<HideViewAnimationObserver> animation_observer_; | 162 scoped_ptr<HideViewAnimationObserver> animation_observer_; |
| 168 | 163 |
| 169 // 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. |
| 170 base::Closure next_paint_callback_; | 165 base::Closure next_paint_callback_; |
| 171 | 166 |
| 172 DISALLOW_COPY_AND_ASSIGN(AppListView); | 167 DISALLOW_COPY_AND_ASSIGN(AppListView); |
| 173 }; | 168 }; |
| 174 | 169 |
| 175 } // namespace app_list | 170 } // namespace app_list |
| 176 | 171 |
| 177 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 172 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
| OLD | NEW |