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

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

Issue 2391253004: Use mojo Shelf interfaces for both mash and classic ash. (Closed)
Patch Set: Address comments. 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
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/launcher/chrome_launcher_controller_mus.h"
17 #include "chrome/browser/ui/views/ash/tab_scrubber.h" 18 #include "chrome/browser/ui/views/ash/tab_scrubber.h"
18 #include "chrome/browser/ui/views/frame/immersive_context_mus.h" 19 #include "chrome/browser/ui/views/frame/immersive_context_mus.h"
19 #include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h" 20 #include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h"
20 #include "chrome/common/chrome_switches.h" 21 #include "chrome/common/chrome_switches.h"
21 #include "ui/aura/env.h" 22 #include "ui/aura/env.h"
22 #include "ui/keyboard/content/keyboard.h" 23 #include "ui/keyboard/content/keyboard.h"
23 #include "ui/keyboard/keyboard_controller.h" 24 #include "ui/keyboard/keyboard_controller.h"
24 25
25 #if defined(OS_CHROMEOS) 26 #if defined(OS_CHROMEOS)
26 #include "chrome/browser/ui/ash/system_tray_client.h" 27 #include "chrome/browser/ui/ash/system_tray_client.h"
(...skipping 21 matching lines...) Expand all
48 // For OS_CHROMEOS, virtual keyboard needs to be initialized before profile 49 // For OS_CHROMEOS, virtual keyboard needs to be initialized before profile
49 // initialized. Otherwise, virtual keyboard extension will not load at login 50 // initialized. Otherwise, virtual keyboard extension will not load at login
50 // screen. 51 // screen.
51 keyboard::InitializeKeyboard(); 52 keyboard::InitializeKeyboard();
52 53
53 ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory); 54 ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory);
54 #endif // defined(OS_CHROMEOS) 55 #endif // defined(OS_CHROMEOS)
55 } 56 }
56 57
57 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() { 58 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
58 if (chrome::IsRunningInMash()) 59 if (chrome::IsRunningInMash()) {
59 chrome::InitializeMash(); 60 DCHECK(!ash::Shell::HasInstance());
61 DCHECK(!ChromeLauncherController::instance());
62 chrome_launcher_controller_mus_ =
63 base::MakeUnique<ChromeLauncherControllerMus>();
64 chrome_launcher_controller_mus_->Init();
65 }
60 66
61 if (!ash::Shell::HasInstance()) 67 if (!ash::Shell::HasInstance())
62 return; 68 return;
63 69
64 // Initialize TabScrubber after the Ash Shell has been initialized. 70 // Initialize TabScrubber after the Ash Shell has been initialized.
65 TabScrubber::GetInstance(); 71 TabScrubber::GetInstance();
66 // Activate virtual keyboard after profile is initialized. It depends on the 72 // Activate virtual keyboard after profile is initialized. It depends on the
67 // default profile. 73 // default profile.
68 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( 74 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard(
69 keyboard::KeyboardController::GetInstance()); 75 keyboard::KeyboardController::GetInstance());
70 } 76 }
71 77
72 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { 78 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
73 #if defined(OS_CHROMEOS) 79 #if defined(OS_CHROMEOS)
74 system_tray_client_.reset(); 80 system_tray_client_.reset();
75 #endif 81 #endif
76 chrome::CloseAsh(); 82 chrome::CloseAsh();
77 } 83 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698