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

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

Issue 2042913002: Converts MruWindowTracker to work with common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: not equal Created 4 years, 6 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"
11 #include "ash/accessibility_delegate.h" 11 #include "ash/accessibility_delegate.h"
12 #include "ash/aura/wm_window_aura.h"
12 #include "ash/common/wm/window_state.h" 13 #include "ash/common/wm/window_state.h"
13 #include "ash/container_delegate_aura.h" 14 #include "ash/container_delegate_aura.h"
14 #include "ash/content/gpu_support_impl.h" 15 #include "ash/content/gpu_support_impl.h"
15 #include "ash/pointer_watcher_delegate_aura.h" 16 #include "ash/pointer_watcher_delegate_aura.h"
16 #include "ash/session/session_state_delegate.h" 17 #include "ash/session/session_state_delegate.h"
17 #include "ash/wm/mru_window_tracker.h" 18 #include "ash/wm/mru_window_tracker.h"
18 #include "ash/wm/window_util.h" 19 #include "ash/wm/window_util.h"
19 #include "base/command_line.h" 20 #include "base/command_line.h"
20 #include "base/macros.h" 21 #include "base/macros.h"
21 #include "base/memory/ptr_util.h" 22 #include "base/memory/ptr_util.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 namespace { 77 namespace {
77 78
78 const char kKeyboardShortcutHelpPageUrl[] = 79 const char kKeyboardShortcutHelpPageUrl[] =
79 "https://support.google.com/chromebook/answer/183101"; 80 "https://support.google.com/chromebook/answer/183101";
80 81
81 void InitAfterFirstSessionStart() { 82 void InitAfterFirstSessionStart() {
82 // Restore focus after the user session is started. It's needed because some 83 // Restore focus after the user session is started. It's needed because some
83 // windows can be opened in background while login UI is still active because 84 // windows can be opened in background while login UI is still active because
84 // we currently restore browser windows before login UI is deleted. 85 // we currently restore browser windows before login UI is deleted.
85 ash::Shell* shell = ash::Shell::GetInstance(); 86 ash::Shell* shell = ash::Shell::GetInstance();
86 ash::MruWindowTracker::WindowList mru_list = 87 aura::Window::Windows mru_list = ash::WmWindowAura::ToAuraWindows(
87 shell->mru_window_tracker()->BuildMruWindowList(); 88 shell->mru_window_tracker()->BuildMruWindowList());
88 if (!mru_list.empty()) 89 if (!mru_list.empty())
89 mru_list.front()->Focus(); 90 mru_list.front()->Focus();
90 91
91 // Enable magnifier scroll keys as there may be no mouse cursor in kiosk mode. 92 // Enable magnifier scroll keys as there may be no mouse cursor in kiosk mode.
92 ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode()); 93 ash::MagnifierKeyScroller::SetEnabled(chrome::IsRunningInForcedAppMode());
93 94
94 // Enable long press action to toggle spoken feedback with hotrod 95 // Enable long press action to toggle spoken feedback with hotrod
95 // remote which can't handle shortcut. 96 // remote which can't handle shortcut.
96 ash::SpokenFeedbackToggler::SetEnabled(chrome::IsRunningInForcedAppMode()); 97 ash::SpokenFeedbackToggler::SetEnabled(chrome::IsRunningInForcedAppMode());
97 } 98 }
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 NOTREACHED() << "Unexpected notification " << type; 560 NOTREACHED() << "Unexpected notification " << type;
560 } 561 }
561 } 562 }
562 563
563 void ChromeShellDelegate::PlatformInit() { 564 void ChromeShellDelegate::PlatformInit() {
564 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 565 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
565 content::NotificationService::AllSources()); 566 content::NotificationService::AllSources());
566 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, 567 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED,
567 content::NotificationService::AllSources()); 568 content::NotificationService::AllSources());
568 } 569 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698