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

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

Issue 11417144: Use rewriting to make ChromeOS keyboard F<number> keys produce extended keycodes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forlanding3 Created 8 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 | Annotate | Revision Log
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 "ash/launcher/launcher_types.h" 7 #include "ash/launcher/launcher_types.h"
8 #include "ash/magnifier/magnifier_constants.h" 8 #include "ash/magnifier/magnifier_constants.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "ash/wm/stacking_controller.h" 10 #include "ash/wm/stacking_controller.h"
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 return new ash::StackingController; 532 return new ash::StackingController;
533 } 533 }
534 534
535 bool ChromeShellDelegate::IsSearchKeyActingAsFunctionKey() const { 535 bool ChromeShellDelegate::IsSearchKeyActingAsFunctionKey() const {
536 #if defined(OS_CHROMEOS) 536 #if defined(OS_CHROMEOS)
537 bool chromebook_function_key = CommandLine::ForCurrentProcess()->HasSwitch( 537 bool chromebook_function_key = CommandLine::ForCurrentProcess()->HasSwitch(
538 switches::kEnableChromebookFunctionKey); 538 switches::kEnableChromebookFunctionKey);
539 if (!chromebook_function_key) 539 if (!chromebook_function_key)
540 return false; 540 return false;
541 541
542 bool chromeos_keyboard = CommandLine::ForCurrentProcess()->HasSwitch(
543 switches::kHasChromeOSKeyboard);
544 if (!chromeos_keyboard)
545 return false;
546
542 Profile* profile = ProfileManager::GetDefaultProfile(); 547 Profile* profile = ProfileManager::GetDefaultProfile();
543 return profile->GetPrefs()->GetBoolean( 548 return profile->GetPrefs()->GetBoolean(
544 prefs::kLanguageSearchKeyActsAsFunctionKey); 549 prefs::kLanguageSearchKeyActsAsFunctionKey);
545 #else 550 #else
546 return false; 551 return false;
547 #endif 552 #endif
548 } 553 }
549 554
550 void ChromeShellDelegate::Observe(int type, 555 void ChromeShellDelegate::Observe(int type,
551 const content::NotificationSource& source, 556 const content::NotificationSource& source,
552 const content::NotificationDetails& details) { 557 const content::NotificationDetails& details) {
553 #if defined(OS_CHROMEOS) 558 #if defined(OS_CHROMEOS)
554 switch (type) { 559 switch (type) {
555 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: 560 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED:
556 ash::Shell::GetInstance()->CreateLauncher(); 561 ash::Shell::GetInstance()->CreateLauncher();
557 break; 562 break;
558 case chrome::NOTIFICATION_SESSION_STARTED: 563 case chrome::NOTIFICATION_SESSION_STARTED:
559 ash::Shell::GetInstance()->ShowLauncher(); 564 ash::Shell::GetInstance()->ShowLauncher();
560 break; 565 break;
561 default: 566 default:
562 NOTREACHED() << "Unexpected notification " << type; 567 NOTREACHED() << "Unexpected notification " << type;
563 } 568 }
564 #else 569 #else
565 // MSVC++ warns about switch statements without any cases. 570 // MSVC++ warns about switch statements without any cases.
566 NOTREACHED() << "Unexpected notification " << type; 571 NOTREACHED() << "Unexpected notification " << type;
567 #endif 572 #endif
568 } 573 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/brightness_controller_chromeos.cc ('k') | chrome/browser/ui/ash/event_rewriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698