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