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

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

Issue 11360045: ash: Add RootWindowHostFactory class. (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/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/root_window_delegate.h"
9 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
10 #include "ash/wm/stacking_controller.h" 11 #include "ash/wm/stacking_controller.h"
11 #include "ash/wm/window_util.h" 12 #include "ash/wm/window_util.h"
12 #include "base/bind.h" 13 #include "base/bind.h"
13 #include "base/command_line.h" 14 #include "base/command_line.h"
14 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 15 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
15 #include "chrome/browser/chromeos/login/screen_locker.h" 16 #include "chrome/browser/chromeos/login/screen_locker.h"
16 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" 17 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h"
17 #include "chrome/browser/lifetime/application_lifetime.h" 18 #include "chrome/browser/lifetime/application_lifetime.h"
18 #include "chrome/browser/prefs/pref_service.h" 19 #include "chrome/browser/prefs/pref_service.h"
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 545
545 bool ChromeShellDelegate::IsSearchKeyActingAsFunctionKey() const { 546 bool ChromeShellDelegate::IsSearchKeyActingAsFunctionKey() const {
546 #if defined(OS_CHROMEOS) 547 #if defined(OS_CHROMEOS)
547 return CommandLine::ForCurrentProcess()->HasSwitch( 548 return CommandLine::ForCurrentProcess()->HasSwitch(
548 switches::kEnableChromebookFunctionKey); 549 switches::kEnableChromebookFunctionKey);
549 #else 550 #else
550 return false; 551 return false;
551 #endif 552 #endif
552 } 553 }
553 554
555 aura::RootWindowDelegate* ChromeShellDelegate::CreateRootWindowDelegate() {
556 return ash::RootWindowDelegate::Create();
557 }
558
554 void ChromeShellDelegate::Observe(int type, 559 void ChromeShellDelegate::Observe(int type,
555 const content::NotificationSource& source, 560 const content::NotificationSource& source,
556 const content::NotificationDetails& details) { 561 const content::NotificationDetails& details) {
557 #if defined(OS_CHROMEOS) 562 #if defined(OS_CHROMEOS)
558 switch (type) { 563 switch (type) {
559 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: 564 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED:
560 ash::Shell::GetInstance()->CreateLauncher(); 565 ash::Shell::GetInstance()->CreateLauncher();
561 break; 566 break;
562 case chrome::NOTIFICATION_SESSION_STARTED: 567 case chrome::NOTIFICATION_SESSION_STARTED:
563 ash::Shell::GetInstance()->ShowLauncher(); 568 ash::Shell::GetInstance()->ShowLauncher();
564 break; 569 break;
565 default: 570 default:
566 NOTREACHED() << "Unexpected notification " << type; 571 NOTREACHED() << "Unexpected notification " << type;
567 } 572 }
568 #else 573 #else
569 // MSVC++ warns about switch statements without any cases. 574 // MSVC++ warns about switch statements without any cases.
570 NOTREACHED() << "Unexpected notification " << type; 575 NOTREACHED() << "Unexpected notification " << type;
571 #endif 576 #endif
572 } 577 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698