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

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

Issue 2628933003: Revert of Reland: 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 b015a0530e8a33db14487e3161136dcbfa9eb4bc..ddb0dba0c79dc98ce97a8cbb3126d9d499908912 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"
@@ -15,20 +19,25 @@
#include "chrome/browser/ui/ash/chrome_shell_content_state.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h"
#include "chrome/browser/ui/ash/media_client.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/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/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 "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"
+#endif // defined(OS_CHROMEOS)
ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh(
ChromeBrowserMainExtraPartsViews* extra_parts_views)
@@ -46,7 +55,10 @@
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>();
@@ -60,6 +72,7 @@
keyboard::InitializeKeyboard();
ui::SelectFileDialog::SetFactory(new SelectFileDialogExtensionFactory);
+#endif // defined(OS_CHROMEOS)
}
void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
@@ -88,6 +101,7 @@
}
void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
+#if defined(OS_CHROMEOS)
vpn_list_forwarder_.reset();
volume_controller_.reset();
new_window_client_.reset();
@@ -95,6 +109,6 @@
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