| 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 "ash/content_support/gpu_support_impl.h" | 7 #include "ash/content_support/gpu_support_impl.h" |
| 8 #include "ash/magnifier/magnifier_constants.h" | 8 #include "ash/magnifier/magnifier_constants.h" |
| 9 #include "ash/wm/window_state.h" | 9 #include "ash/wm/window_state.h" |
| 10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 94 } |
| 95 | 95 |
| 96 content::BrowserContext* ChromeShellDelegate::GetActiveBrowserContext() { | 96 content::BrowserContext* ChromeShellDelegate::GetActiveBrowserContext() { |
| 97 #if defined(OS_CHROMEOS) | 97 #if defined(OS_CHROMEOS) |
| 98 DCHECK(user_manager::UserManager::Get()->GetLoggedInUsers().size()); | 98 DCHECK(user_manager::UserManager::Get()->GetLoggedInUsers().size()); |
| 99 #endif | 99 #endif |
| 100 return ProfileManager::GetActiveUserProfile(); | 100 return ProfileManager::GetActiveUserProfile(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 app_list::AppListViewDelegate* ChromeShellDelegate::GetAppListViewDelegate() { | 103 app_list::AppListViewDelegate* ChromeShellDelegate::GetAppListViewDelegate() { |
| 104 #if defined(USE_ATHENA) |
| 105 return NULL; |
| 106 #else |
| 104 DCHECK(ash::Shell::HasInstance()); | 107 DCHECK(ash::Shell::HasInstance()); |
| 105 return AppListServiceAsh::GetInstance()->GetViewDelegate( | 108 return AppListServiceAsh::GetInstance()->GetViewDelegate( |
| 106 Profile::FromBrowserContext(GetActiveBrowserContext())); | 109 Profile::FromBrowserContext(GetActiveBrowserContext())); |
| 110 #endif |
| 107 } | 111 } |
| 108 | 112 |
| 109 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate( | 113 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate( |
| 110 ash::ShelfModel* model) { | 114 ash::ShelfModel* model) { |
| 111 if (!shelf_delegate_) { | 115 if (!shelf_delegate_) { |
| 112 shelf_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); | 116 shelf_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); |
| 113 shelf_delegate_->Init(); | 117 shelf_delegate_->Init(); |
| 114 } | 118 } |
| 115 return shelf_delegate_; | 119 return shelf_delegate_; |
| 116 } | 120 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 156 |
| 153 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( | 157 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( |
| 154 ash::VirtualKeyboardStateObserver* observer) { | 158 ash::VirtualKeyboardStateObserver* observer) { |
| 155 keyboard_state_observer_list_.AddObserver(observer); | 159 keyboard_state_observer_list_.AddObserver(observer); |
| 156 } | 160 } |
| 157 | 161 |
| 158 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( | 162 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( |
| 159 ash::VirtualKeyboardStateObserver* observer) { | 163 ash::VirtualKeyboardStateObserver* observer) { |
| 160 keyboard_state_observer_list_.RemoveObserver(observer); | 164 keyboard_state_observer_list_.RemoveObserver(observer); |
| 161 } | 165 } |
| OLD | NEW |