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

Unified Diff: ash/shell.cc

Issue 2918403006: CrOS Tablet Window management - Split Screen part I (Closed)
Patch Set: Fix failed tests. 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
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 61379d587dbbeef3f3137f90b83b5ea7d2beec5b..44bbe7968247af6064c1bd028d7bca6117388a5f 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -107,6 +107,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"
@@ -451,6 +452,10 @@ void Shell::DoInitialWorkspaceAnimation() {
->DoInitialAnimation();
}
+bool Shell::IsSplitViewModeActive() const {
+ return split_view_controller_->IsSplitViewModeActive();
+}
+
void Shell::AddShellObserver(ShellObserver* observer) {
shell_observers_.AddObserver(observer);
}
@@ -516,6 +521,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_)
@@ -713,6 +728,8 @@ Shell::~Shell() {
screen_pinning_controller_.reset();
+ split_view_controller_.reset();
oshima 2017/06/14 00:19:26 can you keep the reverse order of init process?
xdai1 2017/06/15 22:11:40 Done. However, in line 639 in this patch the comme
oshima 2017/06/16 01:20:56 That's added after we had issues with mixed order.
xdai1 2017/06/16 18:49:52 I see. Thanks!
+
resolution_notification_controller_.reset();
screenshot_controller_.reset();
mouse_cursor_filter_.reset();
@@ -1106,6 +1123,8 @@ void Shell::Init(const ShellInitParams& init_params) {
}
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.

Powered by Google App Engine
This is Rietveld 408576698