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

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

Issue 2549903002: mash: Reverse the responsibilities of the NewWindowClient. (Closed)
Patch Set: jamescook comments Created 4 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
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"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "chrome/browser/chrome_browser_main.h" 14 #include "chrome/browser/chrome_browser_main.h"
15 #include "chrome/browser/ui/ash/ash_init.h" 15 #include "chrome/browser/ui/ash/ash_init.h"
16 #include "chrome/browser/ui/ash/ash_util.h" 16 #include "chrome/browser/ui/ash/ash_util.h"
17 #include "chrome/browser/ui/ash/cast_config_client_media_router.h" 17 #include "chrome/browser/ui/ash/cast_config_client_media_router.h"
18 #include "chrome/browser/ui/ash/chrome_new_window_client.h"
18 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h" 19 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h"
19 #include "chrome/browser/ui/views/ash/tab_scrubber.h" 20 #include "chrome/browser/ui/views/ash/tab_scrubber.h"
20 #include "chrome/browser/ui/views/frame/immersive_context_mus.h" 21 #include "chrome/browser/ui/views/frame/immersive_context_mus.h"
21 #include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h" 22 #include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h"
22 #include "chrome/common/chrome_switches.h" 23 #include "chrome/common/chrome_switches.h"
23 #include "ui/aura/env.h" 24 #include "ui/aura/env.h"
24 #include "ui/keyboard/content/keyboard.h" 25 #include "ui/keyboard/content/keyboard.h"
25 #include "ui/keyboard/keyboard_controller.h" 26 #include "ui/keyboard/keyboard_controller.h"
26 27
27 #if defined(OS_CHROMEOS) 28 #if defined(OS_CHROMEOS)
(...skipping 13 matching lines...) Expand all
41 chrome::OpenAsh(gfx::kNullAcceleratedWidget); 42 chrome::OpenAsh(gfx::kNullAcceleratedWidget);
42 43
43 if (chrome::IsRunningInMash()) { 44 if (chrome::IsRunningInMash()) {
44 immersive_context_ = base::MakeUnique<ImmersiveContextMus>(); 45 immersive_context_ = base::MakeUnique<ImmersiveContextMus>();
45 immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryMus>(); 46 immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryMus>();
46 } 47 }
47 48
48 #if defined(OS_CHROMEOS) 49 #if defined(OS_CHROMEOS)
49 // Must be available at login screen, so initialize before profile. 50 // Must be available at login screen, so initialize before profile.
50 system_tray_client_ = base::MakeUnique<SystemTrayClient>(); 51 system_tray_client_ = base::MakeUnique<SystemTrayClient>();
51 52 new_window_client_ = base::MakeUnique<ChromeNewWindowClient>();
52 volume_controller_ = base::MakeUnique<VolumeController>(); 53 volume_controller_ = base::MakeUnique<VolumeController>();
53
54 vpn_list_forwarder_ = base::MakeUnique<VpnListForwarder>(); 54 vpn_list_forwarder_ = base::MakeUnique<VpnListForwarder>();
55 55
56 // For OS_CHROMEOS, virtual keyboard needs to be initialized before profile 56 // For OS_CHROMEOS, virtual keyboard needs to be initialized before profile
57 // initialized. Otherwise, virtual keyboard extension will not load at login 57 // initialized. Otherwise, virtual keyboard extension will not load at login
58 // screen. 58 // screen.
59 keyboard::InitializeKeyboard(); 59 keyboard::InitializeKeyboard();
60 60
61 ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory); 61 ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory);
62 #endif // defined(OS_CHROMEOS) 62 #endif // defined(OS_CHROMEOS)
63 } 63 }
(...skipping 18 matching lines...) Expand all
82 // Activate virtual keyboard after profile is initialized. It depends on the 82 // Activate virtual keyboard after profile is initialized. It depends on the
83 // default profile. 83 // default profile.
84 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( 84 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard(
85 keyboard::KeyboardController::GetInstance()); 85 keyboard::KeyboardController::GetInstance());
86 } 86 }
87 87
88 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { 88 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
89 #if defined(OS_CHROMEOS) 89 #if defined(OS_CHROMEOS)
90 vpn_list_forwarder_.reset(); 90 vpn_list_forwarder_.reset();
91 volume_controller_.reset(); 91 volume_controller_.reset();
92 new_window_client_.reset();
92 system_tray_client_.reset(); 93 system_tray_client_.reset();
93 cast_config_client_media_router_.reset(); 94 cast_config_client_media_router_.reset();
94 #endif 95 #endif
95 chrome::CloseAsh(); 96 chrome::CloseAsh();
96 } 97 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698