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

Unified Diff: ash/mus/non_client_frame_controller.cc

Issue 2369793002: WIP: Propagate SurfaceID up window tree hierarchy
Patch Set: Fix input events: EventDispatcher ignores container windows Created 4 years, 3 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 | « ash/mus/non_client_frame_controller.h ('k') | ash/mus/root_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ash/mus/non_client_frame_controller.h ('k') | ash/mus/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698