| 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 <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 ui::PAGE_TRANSITION_AUTO_BOOKMARK); | 493 ui::PAGE_TRANSITION_AUTO_BOOKMARK); |
| 494 params.disposition = WindowOpenDisposition::SINGLETON_TAB; | 494 params.disposition = WindowOpenDisposition::SINGLETON_TAB; |
| 495 chrome::Navigate(¶ms); | 495 chrome::Navigate(¶ms); |
| 496 } | 496 } |
| 497 | 497 |
| 498 gfx::Image ChromeShellDelegate::GetDeprecatedAcceleratorImage() const { | 498 gfx::Image ChromeShellDelegate::GetDeprecatedAcceleratorImage() const { |
| 499 return ui::ResourceBundle::GetSharedInstance().GetImageNamed( | 499 return ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| 500 IDR_BLUETOOTH_KEYBOARD); | 500 IDR_BLUETOOTH_KEYBOARD); |
| 501 } | 501 } |
| 502 | 502 |
| 503 bool ChromeShellDelegate::IsTouchscreenEnabledInPrefs( |
| 504 bool use_local_state) const { |
| 505 return chromeos::system::InputDeviceSettings::Get() |
| 506 ->IsTouchscreenEnabledInPrefs(use_local_state); |
| 507 } |
| 508 |
| 509 void ChromeShellDelegate::SetTouchscreenEnabledInPrefs(bool enabled, |
| 510 bool use_local_state) { |
| 511 chromeos::system::InputDeviceSettings::Get()->SetTouchscreenEnabledInPrefs( |
| 512 enabled, use_local_state); |
| 513 } |
| 514 |
| 515 void ChromeShellDelegate::UpdateTouchscreenStatusFromPrefs() { |
| 516 chromeos::system::InputDeviceSettings::Get() |
| 517 ->UpdateTouchscreenStatusFromPrefs(); |
| 518 } |
| 519 |
| 503 void ChromeShellDelegate::ToggleTouchpad() { | 520 void ChromeShellDelegate::ToggleTouchpad() { |
| 504 chromeos::system::InputDeviceSettings::Get()->ToggleTouchpad(); | 521 chromeos::system::InputDeviceSettings::Get()->ToggleTouchpad(); |
| 505 } | 522 } |
| 506 | 523 |
| 507 void ChromeShellDelegate::ToggleTouchscreen() { | |
| 508 chromeos::system::InputDeviceSettings::Get()->ToggleTouchscreen(); | |
| 509 } | |
| 510 | |
| 511 keyboard::KeyboardUI* ChromeShellDelegate::CreateKeyboardUI() { | 524 keyboard::KeyboardUI* ChromeShellDelegate::CreateKeyboardUI() { |
| 512 return new ChromeKeyboardUI(ProfileManager::GetActiveUserProfile()); | 525 return new ChromeKeyboardUI(ProfileManager::GetActiveUserProfile()); |
| 513 } | 526 } |
| 514 | 527 |
| 515 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { | 528 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { |
| 516 return new SessionStateDelegateChromeos; | 529 return new SessionStateDelegateChromeos; |
| 517 } | 530 } |
| 518 | 531 |
| 519 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() { | 532 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() { |
| 520 return new AccessibilityDelegateImpl; | 533 return new AccessibilityDelegateImpl; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 NOTREACHED() << "Unexpected notification " << type; | 582 NOTREACHED() << "Unexpected notification " << type; |
| 570 } | 583 } |
| 571 } | 584 } |
| 572 | 585 |
| 573 void ChromeShellDelegate::PlatformInit() { | 586 void ChromeShellDelegate::PlatformInit() { |
| 574 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 587 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 575 content::NotificationService::AllSources()); | 588 content::NotificationService::AllSources()); |
| 576 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 589 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
| 577 content::NotificationService::AllSources()); | 590 content::NotificationService::AllSources()); |
| 578 } | 591 } |
| OLD | NEW |