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

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

Issue 2271373002: mash: Port mojo:ash_sysui's ContextMenuMus to mojo:ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 3 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 <limits> 9 #include <limits>
10 10
11 #include "ash/accelerators/magnifier_key_scroller.h" 11 #include "ash/accelerators/magnifier_key_scroller.h"
12 #include "ash/accelerators/spoken_feedback_toggler.h" 12 #include "ash/accelerators/spoken_feedback_toggler.h"
13 #include "ash/aura/wm_window_aura.h" 13 #include "ash/aura/wm_window_aura.h"
14 #include "ash/common/accessibility_delegate.h" 14 #include "ash/common/accessibility_delegate.h"
15 #include "ash/common/accessibility_types.h" 15 #include "ash/common/accessibility_types.h"
16 #include "ash/common/session/session_state_delegate.h" 16 #include "ash/common/session/session_state_delegate.h"
17 #include "ash/common/wallpaper/wallpaper_delegate.h"
17 #include "ash/common/wm/mru_window_tracker.h" 18 #include "ash/common/wm/mru_window_tracker.h"
18 #include "ash/common/wm/window_state.h" 19 #include "ash/common/wm/window_state.h"
19 #include "ash/common/wm_shell.h" 20 #include "ash/common/wm_shell.h"
20 #include "ash/content/gpu_support_impl.h" 21 #include "ash/content/gpu_support_impl.h"
21 #include "ash/shell.h" 22 #include "ash/shell.h"
22 #include "ash/wm/window_util.h" 23 #include "ash/wm/window_util.h"
23 #include "base/command_line.h" 24 #include "base/command_line.h"
24 #include "base/macros.h" 25 #include "base/macros.h"
25 #include "base/memory/ptr_util.h" 26 #include "base/memory/ptr_util.h"
26 #include "build/build_config.h" 27 #include "build/build_config.h"
27 #include "chrome/browser/app_mode/app_mode_utils.h" 28 #include "chrome/browser/app_mode/app_mode_utils.h"
28 #include "chrome/browser/chrome_notification_types.h" 29 #include "chrome/browser/chrome_notification_types.h"
29 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 30 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
30 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 31 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
31 #include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h" 32 #include "chrome/browser/chromeos/background/ash_wallpaper_delegate.h"
32 #include "chrome/browser/chromeos/display/display_configuration_observer.h" 33 #include "chrome/browser/chromeos/display/display_configuration_observer.h"
33 #include "chrome/browser/chromeos/display/display_preferences.h" 34 #include "chrome/browser/chromeos/display/display_preferences.h"
34 #include "chrome/browser/chromeos/policy/display_rotation_default_handler.h" 35 #include "chrome/browser/chromeos/policy/display_rotation_default_handler.h"
35 #include "chrome/browser/chromeos/profiles/profile_helper.h" 36 #include "chrome/browser/chromeos/profiles/profile_helper.h"
36 #include "chrome/browser/chromeos/system/input_device_settings.h" 37 #include "chrome/browser/chromeos/system/input_device_settings.h"
37 #include "chrome/browser/lifetime/application_lifetime.h" 38 #include "chrome/browser/lifetime/application_lifetime.h"
38 #include "chrome/browser/profiles/profile.h" 39 #include "chrome/browser/profiles/profile.h"
39 #include "chrome/browser/profiles/profile_manager.h" 40 #include "chrome/browser/profiles/profile_manager.h"
40 #include "chrome/browser/profiles/profiles_state.h" 41 #include "chrome/browser/profiles/profiles_state.h"
41 #include "chrome/browser/signin/signin_error_notifier_factory_ash.h" 42 #include "chrome/browser/signin/signin_error_notifier_factory_ash.h"
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 505
505 std::unique_ptr<ash::PaletteDelegate> 506 std::unique_ptr<ash::PaletteDelegate>
506 ChromeShellDelegate::CreatePaletteDelegate() { 507 ChromeShellDelegate::CreatePaletteDelegate() {
507 return base::WrapUnique(new chromeos::PaletteDelegateChromeOS()); 508 return base::WrapUnique(new chromeos::PaletteDelegateChromeOS());
508 } 509 }
509 510
510 ash::SystemTrayDelegate* ChromeShellDelegate::CreateSystemTrayDelegate() { 511 ash::SystemTrayDelegate* ChromeShellDelegate::CreateSystemTrayDelegate() {
511 return chromeos::CreateSystemTrayDelegate(); 512 return chromeos::CreateSystemTrayDelegate();
512 } 513 }
513 514
514 ash::UserWallpaperDelegate* ChromeShellDelegate::CreateUserWallpaperDelegate() { 515 std::unique_ptr<ash::WallpaperDelegate>
515 return chromeos::CreateUserWallpaperDelegate(); 516 ChromeShellDelegate::CreateWallpaperDelegate() {
517 return base::WrapUnique(chromeos::CreateWallpaperDelegate());
516 } 518 }
517 519
518 void ChromeShellDelegate::Observe(int type, 520 void ChromeShellDelegate::Observe(int type,
519 const content::NotificationSource& source, 521 const content::NotificationSource& source,
520 const content::NotificationDetails& details) { 522 const content::NotificationDetails& details) {
521 switch (type) { 523 switch (type) {
522 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: { 524 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: {
523 Profile* profile = content::Details<Profile>(details).ptr(); 525 Profile* profile = content::Details<Profile>(details).ptr();
524 if (!chromeos::ProfileHelper::IsSigninProfile(profile) && 526 if (!chromeos::ProfileHelper::IsSigninProfile(profile) &&
525 !profile->IsGuestSession() && !profile->IsSupervised()) { 527 !profile->IsGuestSession() && !profile->IsSupervised()) {
(...skipping 20 matching lines...) Expand all
546 NOTREACHED() << "Unexpected notification " << type; 548 NOTREACHED() << "Unexpected notification " << type;
547 } 549 }
548 } 550 }
549 551
550 void ChromeShellDelegate::PlatformInit() { 552 void ChromeShellDelegate::PlatformInit() {
551 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 553 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
552 content::NotificationService::AllSources()); 554 content::NotificationService::AllSources());
553 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, 555 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED,
554 content::NotificationService::AllSources()); 556 content::NotificationService::AllSources());
555 } 557 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/ash/launcher/launcher_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698