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

Unified Diff: ui/aura_shell/shell.cc

Issue 8574033: Beginnings of Window Modality support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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: ui/aura_shell/shell.cc
===================================================================
--- ui/aura_shell/shell.cc (revision 110305)
+++ ui/aura_shell/shell.cc (working copy)
@@ -22,6 +22,7 @@
#include "ui/aura_shell/stacking_controller.h"
#include "ui/aura_shell/toplevel_layout_manager.h"
#include "ui/aura_shell/toplevel_window_event_filter.h"
+#include "ui/aura_shell/transient_container_layout_manager.h"
#include "ui/aura_shell/workspace_controller.h"
#include "ui/gfx/compositor/layer.h"
#include "ui/gfx/compositor/layer_animator.h"
@@ -60,6 +61,16 @@
launcher_container->set_id(internal::kShellWindowId_LauncherContainer);
containers->push_back(launcher_container);
+ aura::Window* transient_container = new aura::Window(NULL);
+ transient_container->SetEventFilter(
+ new ToplevelWindowEventFilter(transient_container));
+ transient_container->SetLayoutManager(
+ new internal::TransientContainerLayoutManager(transient_container));
+ transient_container->set_id(internal::kShellWindowId_TransientContainer);
+ containers->push_back(transient_container);
+
+ // TODO(beng): Figure out if we can make this use ModalityEventFilter instead
+ // of stops_event_propagation.
aura::Window* lock_container = new aura::Window(NULL);
lock_container->set_stops_event_propagation(true);
lock_container->set_id(internal::kShellWindowId_LockScreenContainer);
@@ -180,6 +191,16 @@
return aura::Desktop::GetInstance()->GetChildById(container_id);
}
+void Shell::AddDesktopEventFilter(aura::EventFilter* filter) {
+ static_cast<internal::DesktopEventFilter*>(
+ aura::Desktop::GetInstance()->event_filter())->AddFilter(filter);
+}
+
+void Shell::RemoveDesktopEventFilter(aura::EventFilter* filter) {
+ static_cast<internal::DesktopEventFilter*>(
+ aura::Desktop::GetInstance()->event_filter())->RemoveFilter(filter);
+}
+
void Shell::ToggleOverview() {
if (workspace_controller_.get())
workspace_controller_->ToggleOverview();

Powered by Google App Engine
This is Rietveld 408576698