| 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" |
| 11 #include "ui/app_list/app_list_model_observer.h" | 11 #include "ui/app_list/app_list_model_observer.h" |
| 12 #include "ui/app_list/speech_ui_model.h" |
| 12 #include "ui/views/bubble/bubble_delegate.h" | 13 #include "ui/views/bubble/bubble_delegate.h" |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 class FilePath; | 16 class FilePath; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace views { | 19 namespace views { |
| 19 class Widget; | 20 class Widget; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace app_list { | 23 namespace app_list { |
| 23 class ApplicationDragAndDropHost; | 24 class ApplicationDragAndDropHost; |
| 24 class AppListMainView; | 25 class AppListMainView; |
| 25 class AppListModel; | 26 class AppListModel; |
| 26 class AppListViewDelegate; | 27 class AppListViewDelegate; |
| 27 class PaginationModel; | 28 class PaginationModel; |
| 28 class SigninDelegate; | 29 class SigninDelegate; |
| 29 class SigninView; | 30 class SigninView; |
| 31 class SpeechView; |
| 30 | 32 |
| 31 // AppListView is the top-level view and controller of app list UI. It creates | 33 // AppListView is the top-level view and controller of app list UI. It creates |
| 32 // and hosts a AppsGridView and passes AppListModel to it for display. | 34 // and hosts a AppsGridView and passes AppListModel to it for display. |
| 33 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView, | 35 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView, |
| 34 public AppListModelObserver { | 36 public AppListModelObserver, |
| 37 public SpeechUIModelObserver { |
| 35 public: | 38 public: |
| 36 class Observer { | 39 class Observer { |
| 37 public: | 40 public: |
| 38 virtual void OnActivationChanged(views::Widget* widget, bool active) = 0; | 41 virtual void OnActivationChanged(views::Widget* widget, bool active) = 0; |
| 39 }; | 42 }; |
| 40 | 43 |
| 41 // Takes ownership of |delegate|. | 44 // Takes ownership of |delegate|. |
| 42 explicit AppListView(AppListViewDelegate* delegate); | 45 explicit AppListView(AppListViewDelegate* delegate); |
| 43 virtual ~AppListView(); | 46 virtual ~AppListView(); |
| 44 | 47 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // Overridden from views::WidgetObserver: | 132 // Overridden from views::WidgetObserver: |
| 130 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; | 133 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; |
| 131 virtual void OnWidgetVisibilityChanged( | 134 virtual void OnWidgetVisibilityChanged( |
| 132 views::Widget* widget, bool visible) OVERRIDE; | 135 views::Widget* widget, bool visible) OVERRIDE; |
| 133 virtual void OnWidgetActivationChanged( | 136 virtual void OnWidgetActivationChanged( |
| 134 views::Widget* widget, bool active) OVERRIDE; | 137 views::Widget* widget, bool active) OVERRIDE; |
| 135 | 138 |
| 136 // Overridden from AppListModelObserver: | 139 // Overridden from AppListModelObserver: |
| 137 virtual void OnAppListModelSigninStatusChanged() OVERRIDE; | 140 virtual void OnAppListModelSigninStatusChanged() OVERRIDE; |
| 138 | 141 |
| 142 // Overridden from SpeechUIModelObserver: |
| 143 virtual void OnSpeechRecognitionStateChanged( |
| 144 SpeechRecognitionState new_state) OVERRIDE; |
| 145 |
| 139 SigninDelegate* GetSigninDelegate(); | 146 SigninDelegate* GetSigninDelegate(); |
| 140 | 147 |
| 141 scoped_ptr<AppListViewDelegate> delegate_; | 148 scoped_ptr<AppListViewDelegate> delegate_; |
| 142 | 149 |
| 143 AppListMainView* app_list_main_view_; | 150 AppListMainView* app_list_main_view_; |
| 144 SigninView* signin_view_; | 151 SigninView* signin_view_; |
| 152 SpeechView* speech_view_; |
| 145 | 153 |
| 146 ObserverList<Observer> observers_; | 154 ObserverList<Observer> observers_; |
| 147 | 155 |
| 148 DISALLOW_COPY_AND_ASSIGN(AppListView); | 156 DISALLOW_COPY_AND_ASSIGN(AppListView); |
| 149 }; | 157 }; |
| 150 | 158 |
| 151 } // namespace app_list | 159 } // namespace app_list |
| 152 | 160 |
| 153 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 161 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
| OLD | NEW |