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

Unified Diff: ash/shell.cc

Issue 2918403006: CrOS Tablet Window management - Split Screen part I (Closed)
Patch Set: Add unittests. Will split the CL into two CLs. Created 3 years, 6 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 | « ash/shell.h ('k') | ash/shell_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « ash/shell.h ('k') | ash/shell_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698