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

Unified Diff: ui/aura/local/window_port_local.h

Issue 2868473002: Implement aura::Window::CreateCompositorFrameSink() (Closed)
Patch Set: Address review issues Created 3 years, 7 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
Index: ui/aura/local/window_port_local.h
diff --git a/ui/aura/window_port_local.h b/ui/aura/local/window_port_local.h
similarity index 64%
rename from ui/aura/window_port_local.h
rename to ui/aura/local/window_port_local.h
index a3b33ce934670ad202ca0b8ab8c62f7c79352327..511d4c2c4b03bc03e58c62aac9c7c01f9da0a6de 100644
--- a/ui/aura/window_port_local.h
+++ b/ui/aura/local/window_port_local.h
@@ -2,13 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_AURA_WINDOW_PORT_LOCAL_H_
-#define UI_AURA_WINDOW_PORT_LOCAL_H_
+#ifndef UI_AURA_LOCAL_WINDOW_PORT_LOCAL_H_
+#define UI_AURA_LOCAL_WINDOW_PORT_LOCAL_H_
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "cc/surfaces/frame_sink_id.h"
#include "ui/aura/window_port.h"
#include "ui/base/property_data.h"
+namespace gfx {
+class Size;
+}
+
namespace aura {
class Window;
@@ -33,13 +39,24 @@ class AURA_EXPORT WindowPortLocal : public WindowPort {
void OnPropertyChanged(const void* key,
int64_t old_value,
std::unique_ptr<ui::PropertyData> data) override;
+ std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink() override;
+ cc::SurfaceId GetSurfaceId() const override;
+ void OnWindowAddedToRootWindow() override;
+ void OnWindowRemovingFromRootWindow() override;
private:
- Window* window_;
+ void OnSurfaceChanged(const cc::SurfaceId& surface_id,
+ const gfx::Size& surface_size);
+
+ Window* const window_;
+ cc::FrameSinkId frame_sink_id_;
+ cc::LocalSurfaceId local_surface_id_;
+
+ base::WeakPtrFactory<WindowPortLocal> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(WindowPortLocal);
};
} // namespace aura
-#endif // UI_AURA_WINDOW_PORT_LOCAL_H_
+#endif // UI_AURA_LOCAL_WINDOW_PORT_LOCAL_H_

Powered by Google App Engine
This is Rietveld 408576698