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

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

Issue 105773004: Introduces the speech recognition UI to app_list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/test/app_list_test_view_delegate.cc ('k') | ui/app_list/views/app_list_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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_view_delegate_observer.h" 11 #include "ui/app_list/app_list_view_delegate_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 #include "ui/views/widget/widget.h" 14 #include "ui/views/widget/widget.h"
14 15
15 namespace base { 16 namespace base {
16 class FilePath; 17 class FilePath;
17 } 18 }
18 19
19 namespace app_list { 20 namespace app_list {
20 class ApplicationDragAndDropHost; 21 class ApplicationDragAndDropHost;
21 class AppListMainView; 22 class AppListMainView;
22 class AppListModel; 23 class AppListModel;
23 class AppListViewDelegate; 24 class AppListViewDelegate;
24 class AppListViewObserver; 25 class AppListViewObserver;
26 class HideViewAnimationObserver;
25 class PaginationModel; 27 class PaginationModel;
26 class SigninDelegate; 28 class SigninDelegate;
27 class SigninView; 29 class SigninView;
30 class SpeechView;
28 31
29 // AppListView is the top-level view and controller of app list UI. It creates 32 // AppListView is the top-level view and controller of app list UI. It creates
30 // and hosts a AppsGridView and passes AppListModel to it for display. 33 // and hosts a AppsGridView and passes AppListModel to it for display.
31 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView, 34 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView,
32 public AppListViewDelegateObserver { 35 public AppListViewDelegateObserver,
36 public SpeechUIModelObserver {
33 public: 37 public:
34 38
35 // Takes ownership of |delegate|. 39 // Takes ownership of |delegate|.
36 explicit AppListView(AppListViewDelegate* delegate); 40 explicit AppListView(AppListViewDelegate* delegate);
37 virtual ~AppListView(); 41 virtual ~AppListView();
38 42
39 // Initializes the widget and use a given |anchor| plus an |anchor_offset| for 43 // Initializes the widget and use a given |anchor| plus an |anchor_offset| for
40 // positioning. 44 // positioning.
41 void InitAsBubbleAttachedToAnchor(gfx::NativeView parent, 45 void InitAsBubbleAttachedToAnchor(gfx::NativeView parent,
42 PaginationModel* pagination_model, 46 PaginationModel* pagination_model,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 124 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
121 virtual void Layout() OVERRIDE; 125 virtual void Layout() OVERRIDE;
122 126
123 // Overridden from views::WidgetObserver: 127 // Overridden from views::WidgetObserver:
124 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; 128 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
125 virtual void OnWidgetVisibilityChanged( 129 virtual void OnWidgetVisibilityChanged(
126 views::Widget* widget, bool visible) OVERRIDE; 130 views::Widget* widget, bool visible) OVERRIDE;
127 virtual void OnWidgetActivationChanged( 131 virtual void OnWidgetActivationChanged(
128 views::Widget* widget, bool active) OVERRIDE; 132 views::Widget* widget, bool active) OVERRIDE;
129 133
134 // Overridden from SpeechUIModelObserver:
135 virtual void OnSpeechRecognitionStateChanged(
136 SpeechRecognitionState new_state) OVERRIDE;
137
130 SigninDelegate* GetSigninDelegate(); 138 SigninDelegate* GetSigninDelegate();
131 139
132 scoped_ptr<AppListViewDelegate> delegate_; 140 scoped_ptr<AppListViewDelegate> delegate_;
133 141
134 AppListMainView* app_list_main_view_; 142 AppListMainView* app_list_main_view_;
135 SigninView* signin_view_; 143 SigninView* signin_view_;
144 SpeechView* speech_view_;
136 145
137 ObserverList<AppListViewObserver> observers_; 146 ObserverList<AppListViewObserver> observers_;
147 scoped_ptr<HideViewAnimationObserver> animation_observer_;
138 148
139 DISALLOW_COPY_AND_ASSIGN(AppListView); 149 DISALLOW_COPY_AND_ASSIGN(AppListView);
140 }; 150 };
141 151
142 } // namespace app_list 152 } // namespace app_list
143 153
144 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ 154 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_
OLDNEW
« no previous file with comments | « ui/app_list/test/app_list_test_view_delegate.cc ('k') | ui/app_list/views/app_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698