| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 = chrome::FindTabbedBrowser(profile, false); | 170 Browser* browser = chrome::FindTabbedBrowser(profile, false); |
| 171 | 171 |
| 172 if (!browser) { | 172 if (!browser) { |
| 173 browser = new Browser( | 173 browser = new Browser(Browser::CreateParams(profile)); |
| 174 Browser::CreateParams(profile, chrome::HOST_DESKTOP_TYPE_ASH)); | |
| 175 browser->window()->Show(); | 174 browser->window()->Show(); |
| 176 } | 175 } |
| 177 | 176 |
| 178 browser->window()->Activate(); | 177 browser->window()->Activate(); |
| 179 | 178 |
| 180 chrome::NavigateParams params(browser, GURL(kKeyboardShortcutHelpPageUrl), | 179 chrome::NavigateParams params(browser, GURL(kKeyboardShortcutHelpPageUrl), |
| 181 ui::PAGE_TRANSITION_AUTO_BOOKMARK); | 180 ui::PAGE_TRANSITION_AUTO_BOOKMARK); |
| 182 params.disposition = SINGLETON_TAB; | 181 params.disposition = SINGLETON_TAB; |
| 183 chrome::Navigate(¶ms); | 182 chrome::Navigate(¶ms); |
| 184 } | 183 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 212 | 211 |
| 213 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( | 212 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( |
| 214 ash::VirtualKeyboardStateObserver* observer) { | 213 ash::VirtualKeyboardStateObserver* observer) { |
| 215 keyboard_state_observer_list_.AddObserver(observer); | 214 keyboard_state_observer_list_.AddObserver(observer); |
| 216 } | 215 } |
| 217 | 216 |
| 218 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( | 217 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( |
| 219 ash::VirtualKeyboardStateObserver* observer) { | 218 ash::VirtualKeyboardStateObserver* observer) { |
| 220 keyboard_state_observer_list_.RemoveObserver(observer); | 219 keyboard_state_observer_list_.RemoveObserver(observer); |
| 221 } | 220 } |
| OLD | NEW |