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

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

Issue 2533373002: Enabled/disable touch screen in TabletPowerButtonController (Closed)
Patch Set: add SetTouchscreenEnabled and OnLoginStateChanged 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 ui::PAGE_TRANSITION_AUTO_BOOKMARK); 498 ui::PAGE_TRANSITION_AUTO_BOOKMARK);
499 params.disposition = WindowOpenDisposition::SINGLETON_TAB; 499 params.disposition = WindowOpenDisposition::SINGLETON_TAB;
500 chrome::Navigate(&params); 500 chrome::Navigate(&params);
501 } 501 }
502 502
503 gfx::Image ChromeShellDelegate::GetDeprecatedAcceleratorImage() const { 503 gfx::Image ChromeShellDelegate::GetDeprecatedAcceleratorImage() const {
504 return ui::ResourceBundle::GetSharedInstance().GetImageNamed( 504 return ui::ResourceBundle::GetSharedInstance().GetImageNamed(
505 IDR_BLUETOOTH_KEYBOARD); 505 IDR_BLUETOOTH_KEYBOARD);
506 } 506 }
507 507
508 bool ChromeShellDelegate::IsTouchscreenEnabled() const {
509 return chromeos::system::InputDeviceSettings::Get()->IsTouchscreenEnabled();
510 }
511
512 void ChromeShellDelegate::SetTouchscreenEnabled(bool enabled) {
513 chromeos::system::InputDeviceSettings::Get()->SetTouchscreenEnabled(enabled);
514 }
515
508 void ChromeShellDelegate::ToggleTouchpad() { 516 void ChromeShellDelegate::ToggleTouchpad() {
509 chromeos::system::InputDeviceSettings::Get()->ToggleTouchpad(); 517 chromeos::system::InputDeviceSettings::Get()->ToggleTouchpad();
510 } 518 }
511 519
512 void ChromeShellDelegate::ToggleTouchscreen() {
513 chromeos::system::InputDeviceSettings::Get()->ToggleTouchscreen();
514 }
515
516 keyboard::KeyboardUI* ChromeShellDelegate::CreateKeyboardUI() { 520 keyboard::KeyboardUI* ChromeShellDelegate::CreateKeyboardUI() {
517 return new ChromeKeyboardUI(ProfileManager::GetActiveUserProfile()); 521 return new ChromeKeyboardUI(ProfileManager::GetActiveUserProfile());
518 } 522 }
519 523
520 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { 524 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() {
521 return new SessionStateDelegateChromeos; 525 return new SessionStateDelegateChromeos;
522 } 526 }
523 527
524 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() { 528 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() {
525 return new AccessibilityDelegateImpl; 529 return new AccessibilityDelegateImpl;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 NOTREACHED() << "Unexpected notification " << type; 578 NOTREACHED() << "Unexpected notification " << type;
575 } 579 }
576 } 580 }
577 581
578 void ChromeShellDelegate::PlatformInit() { 582 void ChromeShellDelegate::PlatformInit() {
579 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 583 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
580 content::NotificationService::AllSources()); 584 content::NotificationService::AllSources());
581 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, 585 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED,
582 content::NotificationService::AllSources()); 586 content::NotificationService::AllSources());
583 } 587 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698