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

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

Issue 11578044: Enable Search-key modifiers for extended key shortcuts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/host/root_window_host_factory.h" 7 #include "ash/host/root_window_host_factory.h"
8 #include "ash/launcher/launcher_types.h" 8 #include "ash/launcher/launcher_types.h"
9 #include "ash/magnifier/magnifier_constants.h" 9 #include "ash/magnifier/magnifier_constants.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 534
535 ui::MenuModel* ChromeShellDelegate::CreateContextMenu(aura::RootWindow* root) { 535 ui::MenuModel* ChromeShellDelegate::CreateContextMenu(aura::RootWindow* root) {
536 DCHECK(launcher_delegate_); 536 DCHECK(launcher_delegate_);
537 return new LauncherContextMenu(launcher_delegate_, root); 537 return new LauncherContextMenu(launcher_delegate_, root);
538 } 538 }
539 539
540 aura::client::StackingClient* ChromeShellDelegate::CreateStackingClient() { 540 aura::client::StackingClient* ChromeShellDelegate::CreateStackingClient() {
541 return new ash::StackingController; 541 return new ash::StackingController;
542 } 542 }
543 543
544 bool ChromeShellDelegate::IsSearchKeyActingAsFunctionKey() const {
545 #if defined(OS_CHROMEOS)
546 return CommandLine::ForCurrentProcess()->HasSwitch(
547 switches::kEnableChromebookFunctionKey);
548 #else
549 return false;
550 #endif
551 }
552
553 ash::RootWindowHostFactory* ChromeShellDelegate::CreateRootWindowHostFactory() { 544 ash::RootWindowHostFactory* ChromeShellDelegate::CreateRootWindowHostFactory() {
554 return ash::RootWindowHostFactory::Create(); 545 return ash::RootWindowHostFactory::Create();
555 } 546 }
556 547
557 void ChromeShellDelegate::Observe(int type, 548 void ChromeShellDelegate::Observe(int type,
558 const content::NotificationSource& source, 549 const content::NotificationSource& source,
559 const content::NotificationDetails& details) { 550 const content::NotificationDetails& details) {
560 #if defined(OS_CHROMEOS) 551 #if defined(OS_CHROMEOS)
561 switch (type) { 552 switch (type) {
562 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: 553 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED:
563 ash::Shell::GetInstance()->CreateLauncher(); 554 ash::Shell::GetInstance()->CreateLauncher();
564 break; 555 break;
565 case chrome::NOTIFICATION_SESSION_STARTED: 556 case chrome::NOTIFICATION_SESSION_STARTED:
566 ash::Shell::GetInstance()->ShowLauncher(); 557 ash::Shell::GetInstance()->ShowLauncher();
567 break; 558 break;
568 default: 559 default:
569 NOTREACHED() << "Unexpected notification " << type; 560 NOTREACHED() << "Unexpected notification " << type;
570 } 561 }
571 #else 562 #else
572 // MSVC++ warns about switch statements without any cases. 563 // MSVC++ warns about switch statements without any cases.
573 NOTREACHED() << "Unexpected notification " << type; 564 NOTREACHED() << "Unexpected notification " << type;
574 #endif 565 #endif
575 } 566 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698