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

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

Issue 22268009: Move signin status and current user information into AppListModel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nit Created 7 years, 4 months 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/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/app_list/app_list_export.h" 9 #include "ui/app_list/app_list_export.h"
10 #include "ui/app_list/signin_delegate_observer.h" 10 #include "ui/app_list/app_list_model_observer.h"
11 #include "ui/views/bubble/bubble_delegate.h" 11 #include "ui/views/bubble/bubble_delegate.h"
12 12
13 namespace views { 13 namespace views {
14 class Widget; 14 class Widget;
15 } 15 }
16 16
17 namespace app_list { 17 namespace app_list {
18 class ApplicationDragAndDropHost; 18 class ApplicationDragAndDropHost;
19 class AppListMainView; 19 class AppListMainView;
20 class AppListModel; 20 class AppListModel;
21 class AppListViewDelegate; 21 class AppListViewDelegate;
22 class PaginationModel; 22 class PaginationModel;
23 class SigninDelegate; 23 class SigninDelegate;
24 class SigninView; 24 class SigninView;
25 25
26 // AppListView is the top-level view and controller of app list UI. It creates 26 // AppListView is the top-level view and controller of app list UI. It creates
27 // and hosts a AppsGridView and passes AppListModel to it for display. 27 // and hosts a AppsGridView and passes AppListModel to it for display.
28 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView, 28 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView,
29 public SigninDelegateObserver { 29 public AppListModelObserver {
30 public: 30 public:
31 // Takes ownership of |delegate|. 31 // Takes ownership of |delegate|.
32 explicit AppListView(AppListViewDelegate* delegate); 32 explicit AppListView(AppListViewDelegate* delegate);
33 virtual ~AppListView(); 33 virtual ~AppListView();
34 34
35 // Initializes the widget. 35 // Initializes the widget.
36 void InitAsBubble(gfx::NativeView parent, 36 void InitAsBubble(gfx::NativeView parent,
37 PaginationModel* pagination_model, 37 PaginationModel* pagination_model,
38 views::View* anchor, 38 views::View* anchor,
39 const gfx::Point& anchor_point, 39 const gfx::Point& anchor_point,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 85 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
86 virtual void Layout() OVERRIDE; 86 virtual void Layout() OVERRIDE;
87 87
88 // Overridden from views::WidgetObserver: 88 // Overridden from views::WidgetObserver:
89 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; 89 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
90 virtual void OnWidgetVisibilityChanged( 90 virtual void OnWidgetVisibilityChanged(
91 views::Widget* widget, bool visible) OVERRIDE; 91 views::Widget* widget, bool visible) OVERRIDE;
92 virtual void OnWidgetActivationChanged( 92 virtual void OnWidgetActivationChanged(
93 views::Widget* widget, bool active) OVERRIDE; 93 views::Widget* widget, bool active) OVERRIDE;
94 94
95 // Overridden from SigninDelegateObserver: 95 // Overridden from AppListModelObserver:
96 virtual void OnSigninSuccess() OVERRIDE; 96 virtual void OnAppListModelSigninStatusChanged() OVERRIDE;
97 virtual void OnAppListModelCurrentUserChanged() OVERRIDE;
97 98
98 SigninDelegate* GetSigninDelegate(); 99 SigninDelegate* GetSigninDelegate();
99 100
100 scoped_ptr<AppListModel> model_; 101 scoped_ptr<AppListModel> model_;
101 scoped_ptr<AppListViewDelegate> delegate_; 102 scoped_ptr<AppListViewDelegate> delegate_;
102 103
103 AppListMainView* app_list_main_view_; 104 AppListMainView* app_list_main_view_;
104 SigninView* signin_view_; 105 SigninView* signin_view_;
105 106
106 DISALLOW_COPY_AND_ASSIGN(AppListView); 107 DISALLOW_COPY_AND_ASSIGN(AppListView);
107 }; 108 };
108 109
109 } // namespace app_list 110 } // namespace app_list
110 111
111 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ 112 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698