| Index: mojo/services/view_manager/display_manager.h
|
| diff --git a/mojo/services/view_manager/display_manager.h b/mojo/services/view_manager/display_manager.h
|
| index 1aa401dd8e01ea5b107c3817146036d572e26b03..fd231ef7b5529cf568e6599a3b1237f1f0cbe984 100644
|
| --- a/mojo/services/view_manager/display_manager.h
|
| +++ b/mojo/services/view_manager/display_manager.h
|
| @@ -9,24 +9,18 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/memory/weak_ptr.h"
|
| +#include "base/timer/timer.h"
|
| +#include "cc/surfaces/surface_id.h"
|
| #include "mojo/public/cpp/bindings/callback.h"
|
| +#include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom.h"
|
| +#include "mojo/services/public/interfaces/surfaces/surfaces.mojom.h"
|
| +#include "mojo/services/public/interfaces/surfaces/surfaces_service.mojom.h"
|
| #include "mojo/services/view_manager/view_manager_export.h"
|
| +#include "ui/gfx/rect.h"
|
|
|
| -namespace gfx {
|
| -class Rect;
|
| -}
|
| -
|
| -namespace aura {
|
| -namespace client {
|
| -class FocusClient;
|
| -class WindowTreeClient;
|
| -}
|
| -class Window;
|
| -class WindowTreeHost;
|
| -}
|
| -
|
| -namespace gfx {
|
| -class Screen;
|
| +namespace cc {
|
| +class SurfaceIdAllocator;
|
| }
|
|
|
| namespace mojo {
|
| @@ -36,15 +30,15 @@ class ApplicationConnection;
|
| namespace service {
|
|
|
| class ConnectionManager;
|
| -class DisplayManagerDelegate;
|
| class ServerView;
|
|
|
| -// DisplayManager binds the root view to an actual display.
|
| -class MOJO_VIEW_MANAGER_EXPORT DisplayManager {
|
| +// DisplayManager binds the root node to an actual display.
|
| +class MOJO_VIEW_MANAGER_EXPORT DisplayManager
|
| + : NON_EXPORTED_BASE(public NativeViewportClient),
|
| + NON_EXPORTED_BASE(public SurfaceClient) {
|
| public:
|
| DisplayManager(ApplicationConnection* app_connection,
|
| ConnectionManager* connection_manager,
|
| - DisplayManagerDelegate* delegate,
|
| const Callback<void()>& native_viewport_closed_callback);
|
| virtual ~DisplayManager();
|
|
|
| @@ -55,26 +49,35 @@ class MOJO_VIEW_MANAGER_EXPORT DisplayManager {
|
| bool in_setup() const { return in_setup_; }
|
|
|
| private:
|
| - class RootWindowDelegateImpl;
|
| + void OnSurfaceConnectionCreated(SurfacePtr surface, uint32_t id_namespace);
|
| + void Draw();
|
|
|
| - void OnCompositorCreated();
|
| + // NativeViewportClient implementation.
|
| + virtual void OnCreated(uint64_t native_viewport_id) OVERRIDE;
|
| + virtual void OnDestroyed() OVERRIDE;
|
| + virtual void OnBoundsChanged(SizePtr bounds) OVERRIDE;
|
| + virtual void OnEvent(EventPtr event,
|
| + const mojo::Callback<void()>& callback) OVERRIDE;
|
|
|
| - DisplayManagerDelegate* delegate_;
|
| + // SurfaceClient implementation.
|
| + virtual void ReturnResources(Array<ReturnedResourcePtr> resources) OVERRIDE;
|
|
|
| ConnectionManager* connection_manager_;
|
|
|
| // Returns true if adding the root view's window to |window_tree_host_|.
|
| bool in_setup_;
|
|
|
| - scoped_ptr<RootWindowDelegateImpl> window_delegate_;
|
| -
|
| - // Owned by its parent aura::Window.
|
| - aura::Window* root_window_;
|
| -
|
| - scoped_ptr<gfx::Screen> screen_;
|
| - scoped_ptr<aura::WindowTreeHost> window_tree_host_;
|
| - scoped_ptr<aura::client::WindowTreeClient> window_tree_client_;
|
| - scoped_ptr<aura::client::FocusClient> focus_client_;
|
| + gfx::Size bounds_;
|
| + gfx::Rect dirty_rect_;
|
| + base::Timer draw_timer_;
|
| +
|
| + SurfacesServicePtr surfaces_service_;
|
| + SurfacePtr surface_;
|
| + scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
|
| + cc::SurfaceId surface_id_;
|
| + NativeViewportPtr native_viewport_;
|
| + Callback<void()> native_viewport_closed_callback_;
|
| + base::WeakPtrFactory<DisplayManager> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DisplayManager);
|
| };
|
|
|