Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 2533373002: Enabled/disable touch screen in TabletPowerButtonController (Closed)
Patch Set: incorporate comments from gab@ and afakhry@ Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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(&params); 495 chrome::Navigate(&params);
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(bool is_local) const {
504 return chromeos::system::InputDeviceSettings::Get()
505 ->IsTouchscreenEnabledInPrefs(is_local);
506 }
507
508 void ChromeShellDelegate::SetTouchscreenEnabledInPrefs(bool enabled,
509 bool is_local) {
510 chromeos::system::InputDeviceSettings::Get()->SetTouchscreenEnabledInPrefs(
511 enabled, is_local);
512 }
513
514 void ChromeShellDelegate::UpdateTouchscreenStatusFromPrefs() {
515 chromeos::system::InputDeviceSettings::Get()
516 ->UpdateTouchscreenStatusFromPrefs();
517 }
518
503 void ChromeShellDelegate::ToggleTouchpad() { 519 void ChromeShellDelegate::ToggleTouchpad() {
504 chromeos::system::InputDeviceSettings::Get()->ToggleTouchpad(); 520 chromeos::system::InputDeviceSettings::Get()->ToggleTouchpad();
505 } 521 }
506 522
507 void ChromeShellDelegate::ToggleTouchscreen() {
508 chromeos::system::InputDeviceSettings::Get()->ToggleTouchscreen();
509 }
510
511 keyboard::KeyboardUI* ChromeShellDelegate::CreateKeyboardUI() { 523 keyboard::KeyboardUI* ChromeShellDelegate::CreateKeyboardUI() {
512 return new ChromeKeyboardUI(ProfileManager::GetActiveUserProfile()); 524 return new ChromeKeyboardUI(ProfileManager::GetActiveUserProfile());
513 } 525 }
514 526
515 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { 527 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() {
516 return new SessionStateDelegateChromeos; 528 return new SessionStateDelegateChromeos;
517 } 529 }
518 530
519 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() { 531 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() {
520 return new AccessibilityDelegateImpl; 532 return new AccessibilityDelegateImpl;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 NOTREACHED() << "Unexpected notification " << type; 581 NOTREACHED() << "Unexpected notification " << type;
570 } 582 }
571 } 583 }
572 584
573 void ChromeShellDelegate::PlatformInit() { 585 void ChromeShellDelegate::PlatformInit() {
574 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 586 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
575 content::NotificationService::AllSources()); 587 content::NotificationService::AllSources());
576 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, 588 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED,
577 content::NotificationService::AllSources()); 589 content::NotificationService::AllSources());
578 } 590 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698