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

Unified Diff: ash/aura/wm_window_aura.cc

Issue 2613863005: Removes/promotes functions from WmWindowMus to WmWindowAura (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | ash/mus/bridge/wm_window_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/aura/wm_window_aura.cc
diff --git a/ash/aura/wm_window_aura.cc b/ash/aura/wm_window_aura.cc
index 187ce852359a710222f4a74a2b70db5dc70764c7..5ab96ea70a64dfcf14274ce1df1790d436b490a2 100644
--- a/ash/aura/wm_window_aura.cc
+++ b/ash/aura/wm_window_aura.cc
@@ -348,8 +348,14 @@ int WmWindowAura::GetIntProperty(WmWindowProperty key) {
if (key == WmWindowProperty::SHELF_ID)
return window_->GetProperty(kShelfIDKey);
- if (key == WmWindowProperty::SHELF_ITEM_TYPE)
- return window_->GetProperty(kShelfItemTypeKey);
+ if (key == WmWindowProperty::SHELF_ITEM_TYPE) {
+ if (aura::Env::GetInstance()->mode() == aura::Env::Mode::LOCAL ||
+ aura_window()->GetProperty(kShelfItemTypeKey) != TYPE_UNDEFINED) {
James Cook 2017/01/05 23:16:47 nit: just use |window_| here and below for consist
sky 2017/01/05 23:30:54 Done.
+ return aura_window()->GetProperty(kShelfItemTypeKey);
+ }
+ // Mash provides a default shelf item type for non-ignored windows.
+ return GetWindowState()->ignored_by_shelf() ? TYPE_UNDEFINED : TYPE_APP;
+ }
if (key == WmWindowProperty::TOP_VIEW_INSET)
return window_->GetProperty(aura::client::kTopViewInset);
@@ -660,6 +666,8 @@ bool WmWindowAura::CanResize() const {
}
bool WmWindowAura::CanActivate() const {
+ // TODO(sky): for aura-mus need to key off CanFocus() as well, which is not
+ // currently mirrored to ash.
return ::wm::CanActivateWindow(window_);
}
@@ -680,6 +688,12 @@ void WmWindowAura::StackChildBelow(WmWindow* child, WmWindow* target) {
}
void WmWindowAura::SetPinned(bool trusted) {
+ if (aura::Env::GetInstance()->mode() == aura::Env::Mode::MUS) {
+ // TODO: fix, see http://crbug.com/622486. With aura-mus pinning may just
+ // work.
+ NOTIMPLEMENTED();
+ return;
+ }
wm::PinWindow(window_, trusted);
}
@@ -759,6 +773,10 @@ WmWindow* WmWindowAura::GetChildByShellWindowId(int id) {
}
void WmWindowAura::ShowResizeShadow(int component) {
+ if (aura::Env::GetInstance()->mode() == aura::Env::Mode::MUS) {
+ // TODO: http://crbug.com/640773.
+ return;
+ }
ResizeShadowController* resize_shadow_controller =
Shell::GetInstance()->resize_shadow_controller();
if (resize_shadow_controller)
@@ -766,6 +784,10 @@ void WmWindowAura::ShowResizeShadow(int component) {
}
void WmWindowAura::HideResizeShadow() {
+ if (aura::Env::GetInstance()->mode() == aura::Env::Mode::MUS) {
+ // TODO: http://crbug.com/640773.
+ return;
+ }
ResizeShadowController* resize_shadow_controller =
Shell::GetInstance()->resize_shadow_controller();
if (resize_shadow_controller)
@@ -774,6 +796,12 @@ void WmWindowAura::HideResizeShadow() {
void WmWindowAura::InstallResizeHandleWindowTargeter(
ImmersiveFullscreenController* immersive_fullscreen_controller) {
+ if (aura::Env::GetInstance()->mode() == aura::Env::Mode::MUS) {
+ // TODO(sky): I believe once ImmersiveFullscreenController is ported this
+ // won't be necessary in mash, but I need to verify that:
+ // http://crbug.com/548435.
+ return;
+ }
window_->SetEventTargeter(base::MakeUnique<ResizeHandleWindowTargeter>(
window_, immersive_fullscreen_controller));
}
« no previous file with comments | « no previous file | ash/mus/bridge/wm_window_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698