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

Side by Side Diff: chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc

Issue 2381753002: Use mojo SystemTray interfaces for both mash and classic ash (Closed)
Patch Set: cleanup Created 4 years, 2 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/views/ash/chrome_browser_main_extra_parts_ash.h" 5 #include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 23 matching lines...) Expand all
34 34
35 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { 35 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() {
36 if (chrome::ShouldOpenAshOnStartup()) 36 if (chrome::ShouldOpenAshOnStartup())
37 chrome::OpenAsh(gfx::kNullAcceleratedWidget); 37 chrome::OpenAsh(gfx::kNullAcceleratedWidget);
38 38
39 if (chrome::IsRunningInMash()) { 39 if (chrome::IsRunningInMash()) {
40 immersive_context_ = base::MakeUnique<ImmersiveContextMus>(); 40 immersive_context_ = base::MakeUnique<ImmersiveContextMus>();
41 immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryMus>(); 41 immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryMus>();
42 #if defined(OS_CHROMEOS) 42 #if defined(OS_CHROMEOS)
43 // Must be available at login screen, so initialize before profile. 43 // Must be available at login screen, so initialize before profile.
44 // TODO: Always create this, even when not in mash.
44 system_tray_client_ = base::MakeUnique<SystemTrayClient>(); 45 system_tray_client_ = base::MakeUnique<SystemTrayClient>();
45 #endif 46 #endif
46 } 47 }
47 48
48 #if defined(OS_CHROMEOS) 49 #if defined(OS_CHROMEOS)
49 // For OS_CHROMEOS, virtual keyboard needs to be initialized before profile 50 // For OS_CHROMEOS, virtual keyboard needs to be initialized before profile
50 // initialized. Otherwise, virtual keyboard extension will not load at login 51 // initialized. Otherwise, virtual keyboard extension will not load at login
51 // screen. 52 // screen.
52 keyboard::InitializeKeyboard(); 53 keyboard::InitializeKeyboard();
53 #endif 54 #endif
(...skipping 17 matching lines...) Expand all
71 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( 72 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard(
72 keyboard::KeyboardController::GetInstance()); 73 keyboard::KeyboardController::GetInstance());
73 } 74 }
74 75
75 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { 76 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
76 #if defined(OS_CHROMEOS) 77 #if defined(OS_CHROMEOS)
77 system_tray_client_.reset(); 78 system_tray_client_.reset();
78 #endif 79 #endif
79 chrome::CloseAsh(); 80 chrome::CloseAsh();
80 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698