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

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

Issue 2115663002: Folds methods in WmShellCommon to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 5 months 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 "ash/accelerators/magnifier_key_scroller.h" 9 #include "ash/accelerators/magnifier_key_scroller.h"
10 #include "ash/accelerators/spoken_feedback_toggler.h" 10 #include "ash/accelerators/spoken_feedback_toggler.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 namespace { 79 namespace {
80 80
81 const char kKeyboardShortcutHelpPageUrl[] = 81 const char kKeyboardShortcutHelpPageUrl[] =
82 "https://support.google.com/chromebook/answer/183101"; 82 "https://support.google.com/chromebook/answer/183101";
83 83
84 void InitAfterFirstSessionStart() { 84 void InitAfterFirstSessionStart() {
85 // Restore focus after the user session is started. It's needed because some 85 // Restore focus after the user session is started. It's needed because some
86 // windows can be opened in background while login UI is still active because 86 // windows can be opened in background while login UI is still active because
87 // we currently restore browser windows before login UI is deleted. 87 // we currently restore browser windows before login UI is deleted.
88 ash::Shell* shell = ash::Shell::GetInstance();
89 aura::Window::Windows mru_list = ash::WmWindowAura::ToAuraWindows( 88 aura::Window::Windows mru_list = ash::WmWindowAura::ToAuraWindows(
90 shell->mru_window_tracker()->BuildMruWindowList()); 89 ash::WmShell::Get()->mru_window_tracker()->BuildMruWindowList());
91 if (!mru_list.empty()) 90 if (!mru_list.empty())
92 mru_list.front()->Focus(); 91 mru_list.front()->Focus();
93 92
94 // Enable magnifier scroll keys as there may be no mouse cursor in kiosk mode. 93 // Enable magnifier scroll keys as there may be no mouse cursor in kiosk mode.
95 ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode()); 94 ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode());
96 95
97 // Enable long press action to toggle spoken feedback with hotrod 96 // Enable long press action to toggle spoken feedback with hotrod
98 // remote which can't handle shortcut. 97 // remote which can't handle shortcut.
99 ash::SpokenFeedbackToggler::SetEnabled(chrome::IsRunningInForcedAppMode()); 98 ash::SpokenFeedbackToggler::SetEnabled(chrome::IsRunningInForcedAppMode());
100 } 99 }
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 NOTREACHED() << "Unexpected notification " << type; 558 NOTREACHED() << "Unexpected notification " << type;
560 } 559 }
561 } 560 }
562 561
563 void ChromeShellDelegate::PlatformInit() { 562 void ChromeShellDelegate::PlatformInit() {
564 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 563 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
565 content::NotificationService::AllSources()); 564 content::NotificationService::AllSources());
566 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, 565 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED,
567 content::NotificationService::AllSources()); 566 content::NotificationService::AllSources());
568 } 567 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698