Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: ui/app_list/views/app_list_view.h

Issue 657653002: Move app list search box into AppListView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "ui/app_list/app_list_export.h" 11 #include "ui/app_list/app_list_export.h"
12 #include "ui/app_list/app_list_view_delegate_observer.h" 12 #include "ui/app_list/app_list_view_delegate_observer.h"
13 #include "ui/app_list/speech_ui_model_observer.h" 13 #include "ui/app_list/speech_ui_model_observer.h"
14 #include "ui/app_list/views/search_box_view.h"
14 #include "ui/views/bubble/bubble_delegate.h" 15 #include "ui/views/bubble/bubble_delegate.h"
15 #include "ui/views/widget/widget.h" 16 #include "ui/views/widget/widget.h"
16 17
17 namespace base { 18 namespace base {
18 class FilePath; 19 class FilePath;
19 } 20 }
20 21
21 namespace test { 22 namespace test {
22 class AppListViewTestApi; 23 class AppListViewTestApi;
23 } 24 }
24 25
25 namespace views { 26 namespace views {
26 class ImageView; 27 class ImageView;
27 } 28 }
28 29
29 namespace app_list { 30 namespace app_list {
30 class ApplicationDragAndDropHost; 31 class ApplicationDragAndDropHost;
31 class AppListMainView; 32 class AppListMainView;
32 class AppListModel; 33 class AppListModel;
33 class AppListViewDelegate; 34 class AppListViewDelegate;
34 class AppListViewObserver; 35 class AppListViewObserver;
35 class HideViewAnimationObserver; 36 class HideViewAnimationObserver;
36 class PaginationModel; 37 class PaginationModel;
38 class SearchBoxView;
37 class SpeechView; 39 class SpeechView;
38 40
39 // AppListView is the top-level view and controller of app list UI. It creates 41 // AppListView is the top-level view and controller of app list UI. It creates
40 // and hosts a AppsGridView and passes AppListModel to it for display. 42 // and hosts a AppsGridView and passes AppListModel to it for display.
41 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView, 43 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView,
42 public AppListViewDelegateObserver, 44 public AppListViewDelegateObserver,
43 public SpeechUIModelObserver { 45 public SpeechUIModelObserver {
44 public: 46 public:
45 // Does not take ownership of |delegate|. 47 // Does not take ownership of |delegate|.
46 explicit AppListView(AppListViewDelegate* delegate); 48 explicit AppListView(AppListViewDelegate* delegate);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 virtual void OnWidgetActivationChanged( 155 virtual void OnWidgetActivationChanged(
154 views::Widget* widget, bool active) OVERRIDE; 156 views::Widget* widget, bool active) OVERRIDE;
155 157
156 // Overridden from SpeechUIModelObserver: 158 // Overridden from SpeechUIModelObserver:
157 virtual void OnSpeechRecognitionStateChanged( 159 virtual void OnSpeechRecognitionStateChanged(
158 SpeechRecognitionState new_state) OVERRIDE; 160 SpeechRecognitionState new_state) OVERRIDE;
159 161
160 AppListViewDelegate* delegate_; // Weak. Owned by AppListService. 162 AppListViewDelegate* delegate_; // Weak. Owned by AppListService.
161 163
162 AppListMainView* app_list_main_view_; 164 AppListMainView* app_list_main_view_;
165 SearchBoxView* search_box_view_;
163 SpeechView* speech_view_; 166 SpeechView* speech_view_;
164 167
165 // The red "experimental" banner for the experimental app list. 168 // The red "experimental" banner for the experimental app list.
166 views::ImageView* experimental_banner_view_; 169 views::ImageView* experimental_banner_view_;
167 170
168 // A semi-transparent white overlay that covers the app list while dialogs are 171 // A semi-transparent white overlay that covers the app list while dialogs are
169 // open. 172 // open.
170 views::View* overlay_view_; 173 views::View* overlay_view_;
171 174
172 ObserverList<AppListViewObserver> observers_; 175 ObserverList<AppListViewObserver> observers_;
173 scoped_ptr<HideViewAnimationObserver> animation_observer_; 176 scoped_ptr<HideViewAnimationObserver> animation_observer_;
174 177
175 // For UMA and testing. If non-null, triggered when the app list is painted. 178 // For UMA and testing. If non-null, triggered when the app list is painted.
176 base::Closure next_paint_callback_; 179 base::Closure next_paint_callback_;
177 180
178 DISALLOW_COPY_AND_ASSIGN(AppListView); 181 DISALLOW_COPY_AND_ASSIGN(AppListView);
179 }; 182 };
180 183
181 } // namespace app_list 184 } // namespace app_list
182 185
183 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ 186 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698