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 "chrome/browser/ui/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
6 | 6 |
7 #include "apps/shell_window.h" | 7 #include "apps/shell_window.h" |
8 #include "apps/shell_window_registry.h" | 8 #include "apps/shell_window_registry.h" |
9 #include "ash/host/root_window_host_factory.h" | 9 #include "ash/host/root_window_host_factory.h" |
10 #include "ash/magnifier/magnifier_constants.h" | 10 #include "ash/magnifier/magnifier_constants.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 DCHECK(ash::Shell::HasInstance()); | 103 DCHECK(ash::Shell::HasInstance()); |
104 // Shell will own the created delegate, and the delegate will own | 104 // Shell will own the created delegate, and the delegate will own |
105 // the controller. | 105 // the controller. |
106 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); | 106 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); |
107 return new AppListViewDelegate( | 107 return new AppListViewDelegate( |
108 scoped_ptr<AppListControllerDelegate>(new AppListControllerDelegateAsh()), | 108 scoped_ptr<AppListControllerDelegate>(new AppListControllerDelegateAsh()), |
109 profile); | 109 profile); |
110 } | 110 } |
111 | 111 |
112 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate( | 112 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate( |
113 ash::LauncherModel* model) { | 113 ash::ShelfModel* model) { |
114 DCHECK(ProfileManager::IsGetDefaultProfileAllowed()); | 114 DCHECK(ProfileManager::IsGetDefaultProfileAllowed()); |
115 // TODO(oshima): This is currently broken with multiple launchers. | 115 // TODO(oshima): This is currently broken with multiple launchers. |
116 // Refactor so that there is just one launcher delegate in the | 116 // Refactor so that there is just one launcher delegate in the |
117 // shell. | 117 // shell. |
118 if (!launcher_delegate_) { | 118 if (!launcher_delegate_) { |
119 launcher_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); | 119 launcher_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); |
120 launcher_delegate_->Init(); | 120 launcher_delegate_->Init(); |
121 } | 121 } |
122 return launcher_delegate_; | 122 return launcher_delegate_; |
123 } | 123 } |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 } | 297 } |
298 | 298 |
299 string16 ChromeShellDelegate::GetProductName() const { | 299 string16 ChromeShellDelegate::GetProductName() const { |
300 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 300 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
301 } | 301 } |
302 | 302 |
303 keyboard::KeyboardControllerProxy* | 303 keyboard::KeyboardControllerProxy* |
304 ChromeShellDelegate::CreateKeyboardControllerProxy() { | 304 ChromeShellDelegate::CreateKeyboardControllerProxy() { |
305 return new AshKeyboardControllerProxy(); | 305 return new AshKeyboardControllerProxy(); |
306 } | 306 } |
OLD | NEW |