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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // Shell will own the created delegate, and the delegate will own | 106 // Shell will own the created delegate, and the delegate will own |
107 // the controller. | 107 // the controller. |
108 return new AppListViewDelegate( | 108 return new AppListViewDelegate( |
109 Profile::FromBrowserContext(GetActiveBrowserContext()), | 109 Profile::FromBrowserContext(GetActiveBrowserContext()), |
110 AppListService::Get(chrome::HOST_DESKTOP_TYPE_ASH)-> | 110 AppListService::Get(chrome::HOST_DESKTOP_TYPE_ASH)-> |
111 GetControllerDelegate()); | 111 GetControllerDelegate()); |
112 } | 112 } |
113 | 113 |
114 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate( | 114 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate( |
115 ash::ShelfModel* model) { | 115 ash::ShelfModel* model) { |
116 DCHECK(ProfileManager::IsGetDefaultProfileAllowed()); | |
117 // TODO(oshima): This is currently broken with multiple launchers. | 116 // TODO(oshima): This is currently broken with multiple launchers. |
118 // Refactor so that there is just one launcher delegate in the | 117 // Refactor so that there is just one launcher delegate in the |
119 // shell. | 118 // shell. |
120 if (!shelf_delegate_) { | 119 if (!shelf_delegate_) { |
121 shelf_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); | 120 shelf_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); |
122 shelf_delegate_->Init(); | 121 shelf_delegate_->Init(); |
123 } | 122 } |
124 return shelf_delegate_; | 123 return shelf_delegate_; |
125 } | 124 } |
126 | 125 |
(...skipping 15 matching lines...) Expand all Loading... |
142 } | 141 } |
143 | 142 |
144 base::string16 ChromeShellDelegate::GetProductName() const { | 143 base::string16 ChromeShellDelegate::GetProductName() const { |
145 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 144 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
146 } | 145 } |
147 | 146 |
148 keyboard::KeyboardControllerProxy* | 147 keyboard::KeyboardControllerProxy* |
149 ChromeShellDelegate::CreateKeyboardControllerProxy() { | 148 ChromeShellDelegate::CreateKeyboardControllerProxy() { |
150 return new AshKeyboardControllerProxy(); | 149 return new AshKeyboardControllerProxy(); |
151 } | 150 } |
OLD | NEW |