Index: components/view_manager/server_view.h |
diff --git a/components/view_manager/server_view.h b/components/view_manager/server_view.h |
index 6be4140564636b376f91515c3b89b2a296d8443e..9b7b30617b1cc3f20c46c71cbf8cb56eb092503e 100644 |
--- a/components/view_manager/server_view.h |
+++ b/components/view_manager/server_view.h |
@@ -31,14 +31,16 @@ class ServerViewObserver; |
// ServerViews do not own their children. If you delete a view that has children |
// the children are implicitly removed. Similarly if a view has a parent and the |
// view is deleted the deleted view is implicitly removed from the parent. |
-class ServerView { |
+class ServerView : public mojo::CompositorFrameReceiver { |
public: |
ServerView(ServerViewDelegate* delegate, const ViewId& id); |
- virtual ~ServerView(); |
+ ~ServerView() override; |
void AddObserver(ServerViewObserver* observer); |
void RemoveObserver(ServerViewObserver* observer); |
+ void Bind(mojo::InterfaceRequest<CompositorFrameReceiver> request); |
+ |
const ViewId& id() const { return id_; } |
void Add(ServerView* child); |
@@ -93,10 +95,19 @@ class ServerView { |
void SetSurfaceId(cc::SurfaceId surface_id); |
const cc::SurfaceId& surface_id() const { return surface_id_; } |
+ const gfx::Size& last_submitted_frame_size() { |
+ return last_submitted_frame_size_; |
+ } |
+ |
// See mojom for for details. |
void set_allows_reembed(bool value) { allows_reembed_ = value; } |
bool allows_reembed() const { return allows_reembed_; } |
+ // mojo::CompositorFrameReceiver: |
+ void SubmitCompositorFrame( |
+ mojo::CompositorFramePtr frame, |
+ const SubmitCompositorFrameCallback& callback) override; |
+ |
#if !defined(NDEBUG) |
std::string GetDebugWindowHierarchy() const; |
void BuildDebugInfo(const std::string& depth, std::string* result) const; |
@@ -119,10 +130,12 @@ class ServerView { |
gfx::Transform transform_; |
bool allows_reembed_; |
ui::TextInputState text_input_state_; |
+ gfx::Size last_submitted_frame_size_; |
std::map<std::string, std::vector<uint8_t>> properties_; |
base::ObserverList<ServerViewObserver> observers_; |
+ mojo::Binding<CompositorFrameReceiver> binding_; |
DISALLOW_COPY_AND_ASSIGN(ServerView); |
}; |