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

Unified Diff: athena/wm/window_manager_impl.cc

Issue 633623002: Handle transient children as a part of transient parent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « athena/wm/window_manager_impl.h ('k') | athena/wm/window_overview_mode.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/window_manager_impl.cc
diff --git a/athena/wm/window_manager_impl.cc b/athena/wm/window_manager_impl.cc
index 35722c1adfa69f27a7743b3c6003d85468c88051..92b6dda59b1439e0c2beb11099ca8e76f9a21a66 100644
--- a/athena/wm/window_manager_impl.cc
+++ b/athena/wm/window_manager_impl.cc
@@ -23,6 +23,7 @@
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
#include "ui/wm/core/shadow_controller.h"
+#include "ui/wm/core/transient_window_manager.h"
#include "ui/wm/core/window_util.h"
#include "ui/wm/core/wm_state.h"
#include "ui/wm/public/activation_client.h"
@@ -99,7 +100,14 @@ void AthenaContainerLayoutManager::OnWindowResized() {
}
void AthenaContainerLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
- if (!instance->window_list_provider_->IsWindowInList(child))
+ // TODO(oshima): Split view modes needs to take the transient window into
+ // account.
+ if (wm::GetTransientParent(child)) {
+ wm::TransientWindowManager::Get(child)
+ ->set_parent_controls_visibility(true);
+ }
+
+ if (!instance->window_list_provider_->IsValidWindow(child))
return;
if (instance->split_view_controller_->IsSplitViewModeActive() &&
@@ -240,10 +248,22 @@ void WindowManagerImpl::SetInOverview(bool active) {
void WindowManagerImpl::InstallAccelerators() {
const AcceleratorData accelerator_data[] = {
- {TRIGGER_ON_PRESS, ui::VKEY_F6, ui::EF_NONE, CMD_TOGGLE_OVERVIEW,
+ {TRIGGER_ON_PRESS,
+ ui::VKEY_F6,
+ ui::EF_NONE,
+ CMD_TOGGLE_OVERVIEW,
+ AF_NONE},
+ {TRIGGER_ON_PRESS,
+ ui::VKEY_F6,
+ ui::EF_CONTROL_DOWN,
+ CMD_TOGGLE_SPLIT_VIEW,
AF_NONE},
- {TRIGGER_ON_PRESS, ui::VKEY_F6, ui::EF_CONTROL_DOWN,
- CMD_TOGGLE_SPLIT_VIEW, AF_NONE},
+ // Debug
+ {TRIGGER_ON_PRESS,
+ ui::VKEY_6,
+ ui::EF_NONE,
+ CMD_TOGGLE_OVERVIEW,
+ AF_NONE | AF_DEBUG},
};
AcceleratorManager::Get()->RegisterAccelerators(
accelerator_data, arraysize(accelerator_data), this);
« no previous file with comments | « athena/wm/window_manager_impl.h ('k') | athena/wm/window_overview_mode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698