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

Unified Diff: ash/shell.cc

Issue 2918403006: CrOS Tablet Window management - Split Screen part I (Closed)
Patch Set: Address oshima@'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 f12e6f4b67940cbc417488f0e969d0e6060a680a..ac0961c21c80fe08a836b46c35ac9293d76909f2 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"
@@ -452,6 +453,10 @@ void Shell::DoInitialWorkspaceAnimation() {
->DoInitialAnimation();
}
+bool Shell::IsSplitViewModeActive() const {
+ return split_view_controller_->IsSplitViewModeActive();
+}
+
void Shell::AddShellObserver(ShellObserver* observer) {
shell_observers_.AddObserver(observer);
}
@@ -517,6 +522,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_)
@@ -632,7 +647,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();
@@ -1115,6 +1132,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.
« no previous file with comments | « ash/shell.h ('k') | ash/shell_observer.h » ('j') | ash/wm/overview/overview_animation_type.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698