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 #include "ash/shell/shell_delegate_impl.h" | 5 #include "ash/shell/shell_delegate_impl.h" |
6 | 6 |
7 #include "ash/accessibility_delegate.h" | 7 #include "ash/accessibility_delegate.h" |
8 #include "ash/app_list/app_list_shower_delegate_factory.h" | 8 #include "ash/app_list/app_list_presenter_delegate_factory.h" |
9 #include "ash/app_list/app_list_view_delegate_factory.h" | 9 #include "ash/app_list/app_list_view_delegate_factory.h" |
10 #include "ash/default_accessibility_delegate.h" | 10 #include "ash/default_accessibility_delegate.h" |
11 #include "ash/default_user_wallpaper_delegate.h" | 11 #include "ash/default_user_wallpaper_delegate.h" |
12 #include "ash/gpu_support_stub.h" | 12 #include "ash/gpu_support_stub.h" |
13 #include "ash/media_delegate.h" | 13 #include "ash/media_delegate.h" |
14 #include "ash/new_window_delegate.h" | 14 #include "ash/new_window_delegate.h" |
15 #include "ash/session/session_state_delegate.h" | 15 #include "ash/session/session_state_delegate.h" |
16 #include "ash/shell/context_menu.h" | 16 #include "ash/shell/context_menu.h" |
17 #include "ash/shell/example_factory.h" | 17 #include "ash/shell/example_factory.h" |
18 #include "ash/shell/shelf_delegate_impl.h" | 18 #include "ash/shell/shelf_delegate_impl.h" |
19 #include "ash/shell/toplevel_window.h" | 19 #include "ash/shell/toplevel_window.h" |
20 #include "ash/shell_window_ids.h" | 20 #include "ash/shell_window_ids.h" |
21 #include "ash/system/tray/default_system_tray_delegate.h" | 21 #include "ash/system/tray/default_system_tray_delegate.h" |
22 #include "ash/test/test_keyboard_ui.h" | 22 #include "ash/test/test_keyboard_ui.h" |
23 #include "ash/wm/window_state.h" | 23 #include "ash/wm/window_state.h" |
24 #include "base/memory/ptr_util.h" | 24 #include "base/memory/ptr_util.h" |
25 #include "base/message_loop/message_loop.h" | 25 #include "base/message_loop/message_loop.h" |
26 #include "base/strings/utf_string_conversions.h" | 26 #include "base/strings/utf_string_conversions.h" |
27 #include "components/user_manager/user_info_impl.h" | 27 #include "components/user_manager/user_info_impl.h" |
28 #include "ui/app_list/app_list_view_delegate.h" | 28 #include "ui/app_list/app_list_view_delegate.h" |
29 #include "ui/app_list/shower/app_list_shower_impl.h" | 29 #include "ui/app_list/presenter/app_list_presenter_impl.h" |
30 #include "ui/aura/window.h" | 30 #include "ui/aura/window.h" |
31 #include "ui/gfx/image/image.h" | 31 #include "ui/gfx/image/image.h" |
32 #include "ui/gfx/image/image_skia.h" | 32 #include "ui/gfx/image/image_skia.h" |
33 | 33 |
34 namespace ash { | 34 namespace ash { |
35 namespace shell { | 35 namespace shell { |
36 namespace { | 36 namespace { |
37 | 37 |
38 class NewWindowDelegateImpl : public NewWindowDelegate { | 38 class NewWindowDelegateImpl : public NewWindowDelegate { |
39 public: | 39 public: |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 private: | 153 private: |
154 std::unique_ptr<app_list::AppListViewDelegate> app_list_view_delegate_; | 154 std::unique_ptr<app_list::AppListViewDelegate> app_list_view_delegate_; |
155 | 155 |
156 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegateFactoryImpl); | 156 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegateFactoryImpl); |
157 }; | 157 }; |
158 | 158 |
159 } // namespace | 159 } // namespace |
160 | 160 |
161 ShellDelegateImpl::ShellDelegateImpl() | 161 ShellDelegateImpl::ShellDelegateImpl() |
162 : shelf_delegate_(nullptr), | 162 : shelf_delegate_(nullptr), |
163 app_list_shower_delegate_factory_(new AppListShowerDelegateFactory( | 163 app_list_presenter_delegate_factory_(new AppListPresenterDelegateFactory( |
164 base::WrapUnique(new AppListViewDelegateFactoryImpl))) {} | 164 base::WrapUnique(new AppListViewDelegateFactoryImpl))) {} |
165 | 165 |
166 ShellDelegateImpl::~ShellDelegateImpl() {} | 166 ShellDelegateImpl::~ShellDelegateImpl() {} |
167 | 167 |
168 bool ShellDelegateImpl::IsFirstRunAfterBoot() const { | 168 bool ShellDelegateImpl::IsFirstRunAfterBoot() const { |
169 return false; | 169 return false; |
170 } | 170 } |
171 | 171 |
172 bool ShellDelegateImpl::IsIncognitoAllowed() const { | 172 bool ShellDelegateImpl::IsIncognitoAllowed() const { |
173 return true; | 173 return true; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 void ShellDelegateImpl::AddVirtualKeyboardStateObserver( | 209 void ShellDelegateImpl::AddVirtualKeyboardStateObserver( |
210 VirtualKeyboardStateObserver* observer) { | 210 VirtualKeyboardStateObserver* observer) { |
211 } | 211 } |
212 | 212 |
213 void ShellDelegateImpl::RemoveVirtualKeyboardStateObserver( | 213 void ShellDelegateImpl::RemoveVirtualKeyboardStateObserver( |
214 VirtualKeyboardStateObserver* observer) { | 214 VirtualKeyboardStateObserver* observer) { |
215 } | 215 } |
216 | 216 |
217 void ShellDelegateImpl::OpenUrl(const GURL& url) {} | 217 void ShellDelegateImpl::OpenUrl(const GURL& url) {} |
218 | 218 |
219 app_list::AppListShower* ShellDelegateImpl::GetAppListShower() { | 219 app_list::AppListPresenter* ShellDelegateImpl::GetAppListPresenter() { |
220 if (!app_list_shower_) { | 220 if (!app_list_presenter_) { |
221 app_list_shower_.reset(new app_list::AppListShowerImpl( | 221 app_list_presenter_.reset(new app_list::AppListPresenterImpl( |
222 app_list_shower_delegate_factory_.get())); | 222 app_list_presenter_delegate_factory_.get())); |
223 } | 223 } |
224 return app_list_shower_.get(); | 224 return app_list_presenter_.get(); |
225 } | 225 } |
226 | 226 |
227 ShelfDelegate* ShellDelegateImpl::CreateShelfDelegate(ShelfModel* model) { | 227 ShelfDelegate* ShellDelegateImpl::CreateShelfDelegate(ShelfModel* model) { |
228 shelf_delegate_ = new ShelfDelegateImpl(); | 228 shelf_delegate_ = new ShelfDelegateImpl(); |
229 return shelf_delegate_; | 229 return shelf_delegate_; |
230 } | 230 } |
231 | 231 |
232 ash::SystemTrayDelegate* ShellDelegateImpl::CreateSystemTrayDelegate() { | 232 ash::SystemTrayDelegate* ShellDelegateImpl::CreateSystemTrayDelegate() { |
233 return new DefaultSystemTrayDelegate; | 233 return new DefaultSystemTrayDelegate; |
234 } | 234 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 base::string16 ShellDelegateImpl::GetProductName() const { | 267 base::string16 ShellDelegateImpl::GetProductName() const { |
268 return base::string16(); | 268 return base::string16(); |
269 } | 269 } |
270 | 270 |
271 gfx::Image ShellDelegateImpl::GetDeprecatedAcceleratorImage() const { | 271 gfx::Image ShellDelegateImpl::GetDeprecatedAcceleratorImage() const { |
272 return gfx::Image(); | 272 return gfx::Image(); |
273 } | 273 } |
274 | 274 |
275 } // namespace shell | 275 } // namespace shell |
276 } // namespace ash | 276 } // namespace ash |
OLD | NEW |