Index: ash/shell.cc |
diff --git a/ash/shell.cc b/ash/shell.cc |
index f647df225985c3a72ebc0e7343d21236a39e1152..521941145d935c3e8ff8c2e5e808c241c2a16f8e 100644 |
--- a/ash/shell.cc |
+++ b/ash/shell.cc |
@@ -108,6 +108,7 @@ |
#include "ash/wm/resize_shadow_controller.h" |
#include "ash/wm/root_window_finder.h" |
#include "ash/wm/screen_pinning_controller.h" |
+#include "ash/wm/splitview/split_view_controller.h" |
#include "ash/wm/system_gesture_event_filter.h" |
#include "ash/wm/system_modal_container_event_filter.h" |
#include "ash/wm/system_modal_container_layout_manager.h" |
@@ -464,6 +465,10 @@ void Shell::DoInitialWorkspaceAnimation() { |
->DoInitialAnimation(); |
} |
+bool Shell::IsSplitViewModeActive() const { |
+ return split_view_controller_->IsSplitViewModeActive(); |
+} |
+ |
void Shell::AddShellObserver(ShellObserver* observer) { |
shell_observers_.AddObserver(observer); |
} |
@@ -529,6 +534,16 @@ void Shell::NotifyOverviewModeEnded() { |
observer.OnOverviewModeEnded(); |
} |
+void Shell::NotifySplitViewModeStarting() { |
+ for (auto& observer : shell_observers_) |
+ observer.OnSplitViewModeStarting(); |
+} |
+ |
+void Shell::NotifySplitViewModeEnded() { |
+ for (auto& observer : shell_observers_) |
+ observer.OnSplitViewModeEnded(); |
+} |
+ |
void Shell::NotifyFullscreenStateChanged(bool is_fullscreen, |
aura::Window* root_window) { |
for (auto& observer : shell_observers_) |
@@ -637,7 +652,9 @@ Shell::~Shell() { |
// See bug crbug.com/134502. |
aura::client::GetFocusClient(GetPrimaryRootWindow())->FocusWindow(nullptr); |
- // Please keep in same order as in Init() because it's easy to miss one. |
+ // Please keep in reverse order as in Init() because it's easy to miss one. |
+ split_view_controller_.reset(); |
+ |
if (window_modality_controller_) |
window_modality_controller_.reset(); |
@@ -1103,6 +1120,8 @@ void Shell::Init(const ShellInitParams& init_params) { |
screen_layout_observer_.reset(new ScreenLayoutObserver()); |
sms_observer_.reset(new SmsObserver()); |
+ split_view_controller_.reset(new SplitViewController()); |
+ |
// The compositor thread and main message loop have to be running in |
// order to create mirror window. Run it after the main message loop |
// is started. |