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

Side by Side Diff: ui/app_list/app_list_view_delegate.h

Issue 63283003: Move AppListModel::Users to AppListViewDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac fixes Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/app_list_model_unittest.cc ('k') | ui/app_list/app_list_view_delegate.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_APP_LIST_VIEW_DELEGATE_H_ 5 #ifndef UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
6 #define UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 6 #define UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
7 7
8 #include <vector>
9
8 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/files/file_path.h"
12 #include "base/strings/string16.h"
9 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
10 #include "ui/app_list/app_list_export.h" 14 #include "ui/app_list/app_list_export.h"
11 15
12 namespace base { 16 namespace base {
13 class FilePath; 17 class FilePath;
14 } 18 }
15 19
16 namespace content { 20 namespace content {
17 class WebContents; 21 class WebContents;
18 } 22 }
19 23
20 namespace gfx { 24 namespace gfx {
21 class ImageSkia; 25 class ImageSkia;
22 } 26 }
23 27
24 namespace app_list { 28 namespace app_list {
25 29
26 class AppListItemModel; 30 class AppListItemModel;
27 class AppListModel; 31 class AppListModel;
28 class SearchResult; 32 class SearchResult;
29 class SigninDelegate; 33 class SigninDelegate;
30 34
31 class APP_LIST_EXPORT AppListViewDelegate { 35 class APP_LIST_EXPORT AppListViewDelegate {
32 public: 36 public:
37 // A user of the app list.
38 struct APP_LIST_EXPORT User {
39 User();
40 ~User();
41
42 // Whether or not this user is the current user of the app list.
43 bool active;
44
45 // The name of this user.
46 base::string16 name;
47
48 // The email address of this user.
49 base::string16 email;
50
51 // The path to this user's profile directory.
52 base::FilePath profile_path;
53 };
54 typedef std::vector<User> Users;
55
33 // AppListView owns the delegate. 56 // AppListView owns the delegate.
34 virtual ~AppListViewDelegate() {} 57 virtual ~AppListViewDelegate() {}
35 58
36 // Sets the delegate to use the profile at |profile_path|. This is currently 59 // Sets the delegate to use the profile at |profile_path|. This is currently
37 // only used by non-Ash Windows. 60 // only used by non-Ash Windows.
38 virtual void SetProfileByPath(const base::FilePath& profile_path) = 0; 61 virtual void SetProfileByPath(const base::FilePath& profile_path) = 0;
39 62
40 // Invoked to initialize the model that AppListView uses. This binds the given 63 // Invoked to initialize the model that AppListView uses. This binds the given
41 // model to this AppListViewDelegate and makes the AppListViewDelegate 64 // model to this AppListViewDelegate and makes the AppListViewDelegate
42 // responsible for updating the model. 65 // responsible for updating the model.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 virtual void OpenHelp() = 0; 109 virtual void OpenHelp() = 0;
87 110
88 // Open the feedback UI. 111 // Open the feedback UI.
89 virtual void OpenFeedback() = 0; 112 virtual void OpenFeedback() = 0;
90 113
91 // Shows the app list for the profile specified by |profile_path|. 114 // Shows the app list for the profile specified by |profile_path|.
92 virtual void ShowForProfileByPath(const base::FilePath& profile_path) = 0; 115 virtual void ShowForProfileByPath(const base::FilePath& profile_path) = 0;
93 116
94 // Get the start page web contents. Owned by the AppListViewDelegate. 117 // Get the start page web contents. Owned by the AppListViewDelegate.
95 virtual content::WebContents* GetStartPageContents() = 0; 118 virtual content::WebContents* GetStartPageContents() = 0;
119
120 // Returns the list of users (for AppListMenu).
121 virtual const Users& GetUsers() const = 0;
96 }; 122 };
97 123
98 } // namespace app_list 124 } // namespace app_list
99 125
100 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 126 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/app_list/app_list_model_unittest.cc ('k') | ui/app_list/app_list_view_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698