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

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

Issue 309443002: Remove need to sign in to use the App Launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 | Annotate | Revision Log
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 13 matching lines...) Expand all
24 24
25 namespace gfx { 25 namespace gfx {
26 class ImageSkia; 26 class ImageSkia;
27 } 27 }
28 28
29 namespace app_list { 29 namespace app_list {
30 30
31 class AppListModel; 31 class AppListModel;
32 class AppListViewDelegateObserver; 32 class AppListViewDelegateObserver;
33 class SearchResult; 33 class SearchResult;
34 class SigninDelegate;
35 class SpeechUIModel; 34 class SpeechUIModel;
36 35
37 class APP_LIST_EXPORT AppListViewDelegate { 36 class APP_LIST_EXPORT AppListViewDelegate {
38 public: 37 public:
39 // A user of the app list. 38 // A user of the app list.
40 struct APP_LIST_EXPORT User { 39 struct APP_LIST_EXPORT User {
41 User(); 40 User();
42 ~User(); 41 ~User();
43 42
44 // Whether or not this user is the current user of the app list. 43 // Whether or not this user is the current user of the app list.
45 bool active; 44 bool active;
46 45
47 // The name of this user. 46 // The name of this user.
48 base::string16 name; 47 base::string16 name;
49 48
50 // The email address of this user. 49 // The email address of this user.
51 base::string16 email; 50 base::string16 email;
52 51
53 // The path to this user's profile directory. 52 // The path to this user's profile directory.
54 base::FilePath profile_path; 53 base::FilePath profile_path;
55
56 // Whether or not the current profile requires sign-in beofre use.
57 bool signin_required;
58 }; 54 };
59 typedef std::vector<User> Users; 55 typedef std::vector<User> Users;
60 56
61 // AppListView owns the delegate. 57 // AppListView owns the delegate.
62 virtual ~AppListViewDelegate() {} 58 virtual ~AppListViewDelegate() {}
63 59
64 // Whether to force the use of a native desktop widget when the app list 60 // Whether to force the use of a native desktop widget when the app list
65 // window is first created. 61 // window is first created.
66 virtual bool ForceNativeDesktop() const = 0; 62 virtual bool ForceNativeDesktop() const = 0;
67 63
68 // Sets the delegate to use the profile at |profile_path|. This is currently 64 // Sets the delegate to use the profile at |profile_path|. This is currently
69 // only used by non-Ash Windows. 65 // only used by non-Ash Windows.
70 virtual void SetProfileByPath(const base::FilePath& profile_path) = 0; 66 virtual void SetProfileByPath(const base::FilePath& profile_path) = 0;
71 67
72 // Gets the model associated with the view delegate. The model may be owned 68 // Gets the model associated with the view delegate. The model may be owned
73 // by the delegate, or owned elsewhere (e.g. a profile keyed service). 69 // by the delegate, or owned elsewhere (e.g. a profile keyed service).
74 virtual AppListModel* GetModel() = 0; 70 virtual AppListModel* GetModel() = 0;
75 71
76 // Gets the SigninDelegate for the app list. Owned by the AppListViewDelegate.
77 virtual SigninDelegate* GetSigninDelegate() = 0;
78
79 // Gets the SpeechUIModel for the app list. Owned by the AppListViewDelegate. 72 // Gets the SpeechUIModel for the app list. Owned by the AppListViewDelegate.
80 virtual SpeechUIModel* GetSpeechUI() = 0; 73 virtual SpeechUIModel* GetSpeechUI() = 0;
81 74
82 // Gets a path to a shortcut for the given app. Returns asynchronously as the 75 // Gets a path to a shortcut for the given app. Returns asynchronously as the
83 // shortcut may not exist yet. 76 // shortcut may not exist yet.
84 virtual void GetShortcutPathForApp( 77 virtual void GetShortcutPathForApp(
85 const std::string& app_id, 78 const std::string& app_id,
86 const base::Callback<void(const base::FilePath&)>& callback) = 0; 79 const base::Callback<void(const base::FilePath&)>& callback) = 0;
87 80
88 // Invoked to start a new search. Delegate collects query input from 81 // Invoked to start a new search. Delegate collects query input from
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 virtual bool ShouldCenterWindow() const = 0; 146 virtual bool ShouldCenterWindow() const = 0;
154 147
155 // Adds/removes an observer for profile changes. 148 // Adds/removes an observer for profile changes.
156 virtual void AddObserver(AppListViewDelegateObserver* observer) {} 149 virtual void AddObserver(AppListViewDelegateObserver* observer) {}
157 virtual void RemoveObserver(AppListViewDelegateObserver* observer) {} 150 virtual void RemoveObserver(AppListViewDelegateObserver* observer) {}
158 }; 151 };
159 152
160 } // namespace app_list 153 } // namespace app_list
161 154
162 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ 155 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698