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

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

Issue 11421055: Add power-user keyboard mode for ChromeOS with Search key acting as a typical Fn key. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SkyNits 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
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/ash/event_rewriter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "ash/wm/stacking_controller.h" 9 #include "ash/wm/stacking_controller.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 483
484 ui::MenuModel* ChromeShellDelegate::CreateContextMenu(aura::RootWindow* root) { 484 ui::MenuModel* ChromeShellDelegate::CreateContextMenu(aura::RootWindow* root) {
485 DCHECK(launcher_delegate_); 485 DCHECK(launcher_delegate_);
486 return new LauncherContextMenu(launcher_delegate_, root); 486 return new LauncherContextMenu(launcher_delegate_, root);
487 } 487 }
488 488
489 aura::client::StackingClient* ChromeShellDelegate::CreateStackingClient() { 489 aura::client::StackingClient* ChromeShellDelegate::CreateStackingClient() {
490 return new ash::StackingController; 490 return new ash::StackingController;
491 } 491 }
492 492
493 bool ChromeShellDelegate::IsSearchKeyActingAsFunctionKey() const {
494 #if defined(OS_CHROMEOS)
495 bool chromebook_function_key = CommandLine::ForCurrentProcess()->HasSwitch(
496 switches::kEnableChromebookFunctionKey);
497 if (!chromebook_function_key)
498 return false;
499
500 Profile* profile = ProfileManager::GetDefaultProfile();
501 return profile->GetPrefs()->GetBoolean(
502 prefs::kLanguageSearchKeyActsAsFunctionKey);
503 #else
504 return false;
505 #endif
506 }
507
493 void ChromeShellDelegate::Observe(int type, 508 void ChromeShellDelegate::Observe(int type,
494 const content::NotificationSource& source, 509 const content::NotificationSource& source,
495 const content::NotificationDetails& details) { 510 const content::NotificationDetails& details) {
496 #if defined(OS_CHROMEOS) 511 #if defined(OS_CHROMEOS)
497 switch (type) { 512 switch (type) {
498 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: 513 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED:
499 ash::Shell::GetInstance()->CreateLauncher(); 514 ash::Shell::GetInstance()->CreateLauncher();
500 break; 515 break;
501 case chrome::NOTIFICATION_SESSION_STARTED: 516 case chrome::NOTIFICATION_SESSION_STARTED:
502 ash::Shell::GetInstance()->ShowLauncher(); 517 ash::Shell::GetInstance()->ShowLauncher();
503 break; 518 break;
504 default: 519 default:
505 NOTREACHED() << "Unexpected notification " << type; 520 NOTREACHED() << "Unexpected notification " << type;
506 } 521 }
507 #else 522 #else
508 // MSVC++ warns about switch statements without any cases. 523 // MSVC++ warns about switch statements without any cases.
509 NOTREACHED() << "Unexpected notification " << type; 524 NOTREACHED() << "Unexpected notification " << type;
510 #endif 525 #endif
511 } 526 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/ash/event_rewriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698