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

Unified Diff: ash/shell.cc

Issue 2918403006: CrOS Tablet Window management - Split Screen part I (Closed)
Patch Set: Address varkha@'s comments. 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 da2a213e156f82810f98311ec2b87d4e7bf01944..69037902e49d672dfb88fe91ab2b46102ac9c04e 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"
@@ -467,6 +468,10 @@ void Shell::DoInitialWorkspaceAnimation() {
->DoInitialAnimation();
}
+bool Shell::IsSplitViewModeActive() const {
+ return split_view_controller_->IsSplitViewModeActive();
+}
+
void Shell::AddShellObserver(ShellObserver* observer) {
shell_observers_.AddObserver(observer);
}
@@ -532,6 +537,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_)
@@ -641,7 +656,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();
@@ -1117,6 +1134,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') | ash/wm/overview/window_grid.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698