| OLD | NEW |
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 base::string16 name; | 50 base::string16 name; |
| 51 | 51 |
| 52 // The email address of this user. | 52 // The email address of this user. |
| 53 base::string16 email; | 53 base::string16 email; |
| 54 | 54 |
| 55 // The path to this user's profile directory. | 55 // The path to this user's profile directory. |
| 56 base::FilePath profile_path; | 56 base::FilePath profile_path; |
| 57 }; | 57 }; |
| 58 typedef std::vector<User> Users; | 58 typedef std::vector<User> Users; |
| 59 | 59 |
| 60 // AppListView owns the delegate. | |
| 61 virtual ~AppListViewDelegate() {} | 60 virtual ~AppListViewDelegate() {} |
| 62 | 61 |
| 63 // Whether to force the use of a native desktop widget when the app list | 62 // Whether to force the use of a native desktop widget when the app list |
| 64 // window is first created. | 63 // window is first created. |
| 65 virtual bool ForceNativeDesktop() const = 0; | 64 virtual bool ForceNativeDesktop() const = 0; |
| 66 | 65 |
| 67 // Sets the delegate to use the profile at |profile_path|. This is currently | 66 // Sets the delegate to use the profile at |profile_path|. This is currently |
| 68 // only used by non-Ash Windows. | 67 // only used by non-Ash Windows. |
| 69 virtual void SetProfileByPath(const base::FilePath& profile_path) = 0; | 68 virtual void SetProfileByPath(const base::FilePath& profile_path) = 0; |
| 70 | 69 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 136 |
| 138 #if defined(TOOLKIT_VIEWS) | 137 #if defined(TOOLKIT_VIEWS) |
| 139 // Creates the web view for the start page. The caller takes the ownership of | 138 // Creates the web view for the start page. The caller takes the ownership of |
| 140 // the returned view. | 139 // the returned view. |
| 141 virtual views::View* CreateStartPageWebView(const gfx::Size& size) = 0; | 140 virtual views::View* CreateStartPageWebView(const gfx::Size& size) = 0; |
| 142 | 141 |
| 143 // Creates the web views for the user-specified custom pages. The caller takes | 142 // Creates the web views for the user-specified custom pages. The caller takes |
| 144 // ownership of the returned views. | 143 // ownership of the returned views. |
| 145 virtual std::vector<views::View*> CreateCustomPageWebViews( | 144 virtual std::vector<views::View*> CreateCustomPageWebViews( |
| 146 const gfx::Size& size) = 0; | 145 const gfx::Size& size) = 0; |
| 146 |
| 147 // Invoked when the custom launcher's animation changes. |
| 148 virtual void CustomLauncherPageAnimationChanged(double progress) = 0; |
| 147 #endif | 149 #endif |
| 148 | 150 |
| 149 // Returns true if the delegate supports speech recognition. | 151 // Returns true if the delegate supports speech recognition. |
| 150 virtual bool IsSpeechRecognitionEnabled() = 0; | 152 virtual bool IsSpeechRecognitionEnabled() = 0; |
| 151 | 153 |
| 152 // Returns the list of users (for AppListMenu). | 154 // Returns the list of users (for AppListMenu). |
| 153 virtual const Users& GetUsers() const = 0; | 155 virtual const Users& GetUsers() const = 0; |
| 154 | 156 |
| 155 // Returns true if the app list should be centered and in landscape mode. | 157 // Returns true if the app list should be centered and in landscape mode. |
| 156 virtual bool ShouldCenterWindow() const = 0; | 158 virtual bool ShouldCenterWindow() const = 0; |
| 157 | 159 |
| 158 // Adds/removes an observer for profile changes. | 160 // Adds/removes an observer for profile changes. |
| 159 virtual void AddObserver(AppListViewDelegateObserver* observer) {} | 161 virtual void AddObserver(AppListViewDelegateObserver* observer) {} |
| 160 virtual void RemoveObserver(AppListViewDelegateObserver* observer) {} | 162 virtual void RemoveObserver(AppListViewDelegateObserver* observer) {} |
| 161 }; | 163 }; |
| 162 | 164 |
| 163 } // namespace app_list | 165 } // namespace app_list |
| 164 | 166 |
| 165 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 167 #endif // UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
| OLD | NEW |