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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "ash/content/gpu_support_impl.h" | 9 #include "ash/content/gpu_support_impl.h" |
10 #include "ash/session/session_state_delegate.h" | 10 #include "ash/session/session_state_delegate.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // Chrome uses real GPU support. | 160 // Chrome uses real GPU support. |
161 return new ash::GPUSupportImpl; | 161 return new ash::GPUSupportImpl; |
162 } | 162 } |
163 | 163 |
164 base::string16 ChromeShellDelegate::GetProductName() const { | 164 base::string16 ChromeShellDelegate::GetProductName() const { |
165 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 165 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
166 } | 166 } |
167 | 167 |
168 void ChromeShellDelegate::OpenKeyboardShortcutHelpPage() const { | 168 void ChromeShellDelegate::OpenKeyboardShortcutHelpPage() const { |
169 Profile* profile = ProfileManager::GetActiveUserProfile(); | 169 Profile* profile = ProfileManager::GetActiveUserProfile(); |
170 Browser* browser = | 170 Browser* browser = chrome::FindTabbedBrowser(profile, false); |
171 chrome::FindTabbedBrowser(profile, false, chrome::HOST_DESKTOP_TYPE_ASH); | |
172 | 171 |
173 if (!browser) { | 172 if (!browser) { |
174 browser = new Browser( | 173 browser = new Browser( |
175 Browser::CreateParams(profile, chrome::HOST_DESKTOP_TYPE_ASH)); | 174 Browser::CreateParams(profile, chrome::HOST_DESKTOP_TYPE_ASH)); |
176 browser->window()->Show(); | 175 browser->window()->Show(); |
177 } | 176 } |
178 | 177 |
179 browser->window()->Activate(); | 178 browser->window()->Activate(); |
180 | 179 |
181 chrome::NavigateParams params(browser, GURL(kKeyboardShortcutHelpPageUrl), | 180 chrome::NavigateParams params(browser, GURL(kKeyboardShortcutHelpPageUrl), |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 212 |
214 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( | 213 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( |
215 ash::VirtualKeyboardStateObserver* observer) { | 214 ash::VirtualKeyboardStateObserver* observer) { |
216 keyboard_state_observer_list_.AddObserver(observer); | 215 keyboard_state_observer_list_.AddObserver(observer); |
217 } | 216 } |
218 | 217 |
219 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( | 218 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( |
220 ash::VirtualKeyboardStateObserver* observer) { | 219 ash::VirtualKeyboardStateObserver* observer) { |
221 keyboard_state_observer_list_.RemoveObserver(observer); | 220 keyboard_state_observer_list_.RemoveObserver(observer); |
222 } | 221 } |
OLD | NEW |