Roll src/third_party/WebKit f298044:aa8346d (svn 202628:202629)
[chromium-blink-merge.git] / components / mus / server_view_delegate.h
blobabe0aaa5b4aa28d20065af01504354ce84a23610
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_MUS_SERVER_VIEW_DELEGATE_H_
6 #define COMPONENTS_MUS_SERVER_VIEW_DELEGATE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "components/mus/public/interfaces/compositor_frame.mojom.h"
10 #include "components/mus/public/interfaces/mus_constants.mojom.h"
12 namespace cc {
13 class CompositorFrame;
16 namespace mus {
18 class ServerView;
19 class SurfacesState;
21 class ServerViewDelegate {
22 public:
23 virtual scoped_ptr<cc::CompositorFrame> UpdateViewTreeFromCompositorFrame(
24 const mojo::CompositorFramePtr& input) = 0;
26 virtual SurfacesState* GetSurfacesState() = 0;
28 virtual void OnScheduleViewPaint(const ServerView* view) = 0;
30 // Returns the root of the view tree to which this |view| is attached. Returns
31 // null if this view is not attached up through to a root view.
32 virtual const ServerView* GetRootView(const ServerView* view) const = 0;
34 protected:
35 virtual ~ServerViewDelegate() {}
38 } // namespace mus
40 #endif // COMPONENTS_MUS_SERVER_VIEW_DELEGATE_H_