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

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

Issue 2277563002: Wires up immersive mode for chrome and mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 4 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
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 32ea2086f9e8ca7c8df0b0ba2b6b0daabbb891ed..382007e2c1afa11ce32de04e5c828457e962da67 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
@@ -9,11 +9,14 @@
#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"
#include "chrome/browser/ui/views/ash/tab_scrubber.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"
@@ -32,6 +35,11 @@ void ChromeBrowserMainExtraPartsAsh::PreProfileInit() {
if (chrome::ShouldOpenAshOnStartup())
chrome::OpenAsh(gfx::kNullAcceleratedWidget);
+ if (chrome::IsRunningInMash()) {
+ immersive_context_ = base::MakeUnique<ImmersiveContextMus>();
+ immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryMus>();
+ }
+
#if defined(OS_CHROMEOS)
// For OS_CHROMEOS, virtual keyboard needs to be initialized before profile
// initialized. Otherwise, virtual keyboard extension will not load at login

Powered by Google App Engine
This is Rietveld 408576698