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

Side by Side Diff: ash/mus/bridge/wm_window_mus.cc

Issue 2227643003: Converts mash to use the common non-client frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@native_widget_mus_fix
Patch Set: tweaks Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/mus/bridge/wm_window_mus.h" 5 #include "ash/mus/bridge/wm_window_mus.h"
6 6
7 #include "ash/common/wm/container_finder.h" 7 #include "ash/common/wm/container_finder.h"
8 #include "ash/common/wm/window_state.h" 8 #include "ash/common/wm/window_state.h"
9 #include "ash/common/wm_layout_manager.h" 9 #include "ash/common/wm_layout_manager.h"
10 #include "ash/common/wm_transient_window_observer.h" 10 #include "ash/common/wm_transient_window_observer.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 gfx::Rect WmWindowMus::ConvertRectToScreen(const gfx::Rect& rect) const { 266 gfx::Rect WmWindowMus::ConvertRectToScreen(const gfx::Rect& rect) const {
267 return gfx::Rect(ConvertPointToScreen(rect.origin()), rect.size()); 267 return gfx::Rect(ConvertPointToScreen(rect.origin()), rect.size());
268 } 268 }
269 269
270 gfx::Rect WmWindowMus::ConvertRectFromScreen(const gfx::Rect& rect) const { 270 gfx::Rect WmWindowMus::ConvertRectFromScreen(const gfx::Rect& rect) const {
271 return gfx::Rect(ConvertPointFromScreen(rect.origin()), rect.size()); 271 return gfx::Rect(ConvertPointFromScreen(rect.origin()), rect.size());
272 } 272 }
273 273
274 gfx::Size WmWindowMus::GetMinimumSize() const { 274 gfx::Size WmWindowMus::GetMinimumSize() const {
275 return widget_ ? widget_->GetMinimumSize() : gfx::Size(); 275 return widget_ && !use_empty_minimum_size_ ? widget_->GetMinimumSize()
276 : gfx::Size();
276 } 277 }
277 278
278 gfx::Size WmWindowMus::GetMaximumSize() const { 279 gfx::Size WmWindowMus::GetMaximumSize() const {
279 return widget_ ? widget_->GetMaximumSize() : gfx::Size(); 280 return widget_ ? widget_->GetMaximumSize() : gfx::Size();
280 } 281 }
281 282
282 bool WmWindowMus::GetTargetVisibility() const { 283 bool WmWindowMus::GetTargetVisibility() const {
283 // TODO: need animation support: http://crbug.com/615087. 284 // TODO: need animation support: http://crbug.com/615087.
284 NOTIMPLEMENTED(); 285 NOTIMPLEMENTED();
285 return window_->visible(); 286 return window_->visible();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 NOTREACHED(); 350 NOTREACHED();
350 return 0; 351 return 0;
351 } 352 }
352 353
353 void WmWindowMus::SetIntProperty(WmWindowProperty key, int value) { 354 void WmWindowMus::SetIntProperty(WmWindowProperty key, int value) {
354 if (key == WmWindowProperty::SHELF_ID) { 355 if (key == WmWindowProperty::SHELF_ID) {
355 NOTIMPLEMENTED(); 356 NOTIMPLEMENTED();
356 return; 357 return;
357 } 358 }
358 359
360 if (key == WmWindowProperty::TOP_VIEW_INSET) {
361 // TODO: need support for TOP_VIEW_INSET: http://crbug.com/615100.
362 NOTIMPLEMENTED();
363 return;
364 }
365
359 NOTREACHED(); 366 NOTREACHED();
360 } 367 }
361 368
362 ShelfItemDetails* WmWindowMus::GetShelfItemDetails() { 369 ShelfItemDetails* WmWindowMus::GetShelfItemDetails() {
363 NOTIMPLEMENTED(); // TODO: Add support; see crbug.com/634150 370 NOTIMPLEMENTED(); // TODO: Add support; see crbug.com/634150
364 return nullptr; 371 return nullptr;
365 } 372 }
366 373
367 void WmWindowMus::SetShelfItemDetails(const ShelfItemDetails& details) { 374 void WmWindowMus::SetShelfItemDetails(const ShelfItemDetails& details) {
368 NOTIMPLEMENTED(); // TODO: Add support; see crbug.com/634150 375 NOTIMPLEMENTED(); // TODO: Add support; see crbug.com/634150
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 } 871 }
865 872
866 void WmWindowMus::OnTransientChildRemoved(ui::Window* window, 873 void WmWindowMus::OnTransientChildRemoved(ui::Window* window,
867 ui::Window* transient) { 874 ui::Window* transient) {
868 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, 875 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_,
869 OnTransientChildRemoved(this, Get(transient))); 876 OnTransientChildRemoved(this, Get(transient)));
870 } 877 }
871 878
872 } // namespace mus 879 } // namespace mus
873 } // namespace ash 880 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698