| Index: ash/mus/non_client_frame_controller.cc
|
| diff --git a/ash/mus/non_client_frame_controller.cc b/ash/mus/non_client_frame_controller.cc
|
| index 070f2b27ffa2d941c0396fbb939623a263f52144..885537df7da40da38639ce8094dc2f708c1c9099 100644
|
| --- a/ash/mus/non_client_frame_controller.cc
|
| +++ b/ash/mus/non_client_frame_controller.cc
|
| @@ -34,6 +34,7 @@
|
| #include "ui/aura/window_tree_host.h"
|
| #include "ui/base/hit_test.h"
|
| #include "ui/compositor/layer.h"
|
| +#include "ui/gfx/geometry/dip_util.h"
|
| #include "ui/gfx/geometry/vector2d.h"
|
| #include "ui/views/mus/native_widget_mus.h"
|
| #include "ui/views/widget/widget.h"
|
| @@ -42,6 +43,15 @@ namespace ash {
|
| namespace mus {
|
| namespace {
|
|
|
| +void SatisfyCallback(const cc::SurfaceSequence& sequence) {
|
| + fprintf(stderr, ">>>%s\n", __PRETTY_FUNCTION__);
|
| +}
|
| +
|
| +void RequireCallback(const cc::SurfaceId& id,
|
| + const cc::SurfaceSequence& sequence) {
|
| + fprintf(stderr, ">>>%s\n", __PRETTY_FUNCTION__);
|
| +}
|
| +
|
| // LayoutManager associated with the window created by WindowTreeHost. Resizes
|
| // all children of the parent to match the bounds of the parent. Additionally
|
| // handles sizing of a Shadow.
|
| @@ -464,5 +474,27 @@ void NonClientFrameController::OnWindowDestroyed(ui::Window* window) {
|
| window_ = nullptr;
|
| }
|
|
|
| +void NonClientFrameController::OnChildWindowSurfaceCreated(
|
| + ui::Window* window,
|
| + const gfx::Size& size,
|
| + float device_scale_factor,
|
| + const cc::SurfaceId& surface_id,
|
| + const cc::SurfaceSequence& surface_sequence) {
|
| + //views::NativeWidgetMus* nwm = views::NativeWidgetMus::GetForWindow(window);
|
| + //fprintf(stderr, ">>>>%s nwm: %p\n", __PRETTY_FUNCTION__, nwm);
|
| + //if (nwm) {
|
| + // gfx::Size size_in_dip = gfx::ConvertSizeToDIP(device_scale_factor, size);
|
| + // nwm->GetNativeView()->layer()->SetShowSurface(
|
| + // surface_id, base::Bind(&SatisfyCallback), base::Bind(&RequireCallback),
|
| + // size, device_scale_factor, size_in_dip);
|
| +
|
| + // fprintf(stderr,
|
| + // ">>>%s size: (%d, %d), device_scale_factor: %f surface_id: %s "
|
| + // "window: %p \n",
|
| + // __PRETTY_FUNCTION__, size.width(), size.height(),
|
| + // device_scale_factor, surface_id.ToString().c_str(), window);
|
| + //}
|
| +}
|
| +
|
| } // namespace mus
|
| } // namespace ash
|
|
|