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

Unified Diff: chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc

Issue 2619943002: Revert "chromeos: Fix shelf appearing at login screen under mash" (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
diff --git a/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc b/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
index 64683b5748f0368dbf8ca9324a050399ba055395..81133c1bf939bbf3878502f9fa1488f1c8e97554 100644
--- a/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
+++ b/chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc
@@ -6,7 +6,11 @@
#include "ash/root_window_controller.h"
#include "ash/shell.h"
+#include "base/command_line.h"
+#include "base/lazy_instance.h"
+#include "base/macros.h"
#include "base/memory/ptr_util.h"
+#include "build/build_config.h"
#include "chrome/browser/chrome_browser_main.h"
#include "chrome/browser/ui/ash/ash_init.h"
#include "chrome/browser/ui/ash/ash_util.h"
@@ -14,21 +18,26 @@
#include "chrome/browser/ui/ash/chrome_new_window_client.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h"
#include "chrome/browser/ui/ash/media_client.h"
-#include "chrome/browser/ui/ash/session_controller_client.h"
-#include "chrome/browser/ui/ash/system_tray_client.h"
-#include "chrome/browser/ui/ash/volume_controller.h"
-#include "chrome/browser/ui/ash/vpn_list_forwarder.h"
#include "chrome/browser/ui/views/ash/tab_scrubber.h"
#include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
#include "chrome/browser/ui/views/frame/immersive_context_mus.h"
#include "chrome/browser/ui/views/frame/immersive_handler_factory_mus.h"
-#include "chrome/browser/ui/views/select_file_dialog_extension.h"
-#include "chrome/browser/ui/views/select_file_dialog_extension_factory.h"
+#include "chrome/common/chrome_switches.h"
+#include "ui/aura/env.h"
#include "ui/keyboard/content/keyboard.h"
#include "ui/keyboard/keyboard_controller.h"
#include "ui/wm/core/capture_controller.h"
#include "ui/wm/core/wm_state.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/ui/ash/session_controller_client.h"
+#include "chrome/browser/ui/ash/system_tray_client.h"
+#include "chrome/browser/ui/ash/volume_controller.h"
+#include "chrome/browser/ui/ash/vpn_list_forwarder.h"
+#include "chrome/browser/ui/views/select_file_dialog_extension.h"
+#include "chrome/browser/ui/views/select_file_dialog_extension_factory.h"
+#endif // defined(OS_CHROMEOS)
+
ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh(
ChromeBrowserMainExtraPartsViews* extra_parts_views)
: extra_parts_views_(extra_parts_views) {}
@@ -45,7 +54,10 @@ void ChromeBrowserMainExtraPartsAsh::PreProfileInit() {
immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryMus>();
}
- session_controller_client_ = base::MakeUnique<SessionControllerClient>();
+#if defined(OS_CHROMEOS)
+ // TODO(xiyuan): Update after SesssionStateDelegate is deprecated.
+ if (chrome::IsRunningInMash())
+ session_controller_client_ = base::MakeUnique<SessionControllerClient>();
// Must be available at login screen, so initialize before profile.
system_tray_client_ = base::MakeUnique<SystemTrayClient>();
@@ -59,6 +71,7 @@ void ChromeBrowserMainExtraPartsAsh::PreProfileInit() {
keyboard::InitializeKeyboard();
ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory);
+#endif // defined(OS_CHROMEOS)
}
void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
@@ -86,6 +99,7 @@ void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
}
void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
+#if defined(OS_CHROMEOS)
vpn_list_forwarder_.reset();
volume_controller_.reset();
new_window_client_.reset();
@@ -93,6 +107,6 @@ void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
media_client_.reset();
cast_config_client_media_router_.reset();
session_controller_client_.reset();
-
+#endif
chrome::CloseAsh();
}
« 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