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

Side by Side Diff: services/view_manager/display_manager.h

Issue 826423008: Use local ids for Surfaces APIs that can only apply to local surfaces (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « services/surfaces/surfaces_impl.cc ('k') | services/view_manager/display_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_VIEW_MANAGER_DISPLAY_MANAGER_H_ 5 #ifndef SERVICES_VIEW_MANAGER_DISPLAY_MANAGER_H_
6 #define SERVICES_VIEW_MANAGER_DISPLAY_MANAGER_H_ 6 #define SERVICES_VIEW_MANAGER_DISPLAY_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 ~DefaultDisplayManager() override; 60 ~DefaultDisplayManager() override;
61 61
62 // DisplayManager: 62 // DisplayManager:
63 void Init(ConnectionManager* connection_manager) override; 63 void Init(ConnectionManager* connection_manager) override;
64 void SchedulePaint(const ServerView* view, const gfx::Rect& bounds) override; 64 void SchedulePaint(const ServerView* view, const gfx::Rect& bounds) override;
65 void SetViewportSize(const gfx::Size& size) override; 65 void SetViewportSize(const gfx::Size& size) override;
66 const mojo::ViewportMetrics& GetViewportMetrics() override; 66 const mojo::ViewportMetrics& GetViewportMetrics() override;
67 67
68 private: 68 private:
69 void OnCreatedNativeViewport(uint64_t native_viewport_id); 69 void OnCreatedNativeViewport(uint64_t native_viewport_id);
70 void OnSurfaceConnectionCreated(mojo::SurfacePtr surface,
71 uint32_t id_namespace);
72 void Draw(); 70 void Draw();
73 71
74 // NativeViewportClient: 72 // NativeViewportClient:
75 void OnDestroyed() override; 73 void OnDestroyed() override;
76 void OnMetricsChanged(mojo::ViewportMetricsPtr metrics) override; 74 void OnMetricsChanged(mojo::ViewportMetricsPtr metrics) override;
77 75
78 // SurfaceClient: 76 // SurfaceClient:
79 void SetIdNamespace(uint32_t id_namespace) override; 77 void SetIdNamespace(uint32_t id_namespace) override;
80 void ReturnResources( 78 void ReturnResources(
81 mojo::Array<mojo::ReturnedResourcePtr> resources) override; 79 mojo::Array<mojo::ReturnedResourcePtr> resources) override;
82 80
83 mojo::ApplicationConnection* app_connection_; 81 mojo::ApplicationConnection* app_connection_;
84 ConnectionManager* connection_manager_; 82 ConnectionManager* connection_manager_;
85 83
86 mojo::ViewportMetrics metrics_; 84 mojo::ViewportMetrics metrics_;
87 gfx::Rect dirty_rect_; 85 gfx::Rect dirty_rect_;
88 base::Timer draw_timer_; 86 base::Timer draw_timer_;
89 87
90 mojo::SurfacesServicePtr surfaces_service_;
91 mojo::SurfacePtr surface_; 88 mojo::SurfacePtr surface_;
92 scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; 89 uint32_t id_namespace_;
93 cc::SurfaceId surface_id_; 90 bool surface_allocated_;
94 mojo::NativeViewportPtr native_viewport_; 91 mojo::NativeViewportPtr native_viewport_;
95 mojo::Callback<void()> native_viewport_closed_callback_; 92 mojo::Callback<void()> native_viewport_closed_callback_;
96 base::WeakPtrFactory<DefaultDisplayManager> weak_factory_; 93 base::WeakPtrFactory<DefaultDisplayManager> weak_factory_;
97 94
98 DISALLOW_COPY_AND_ASSIGN(DefaultDisplayManager); 95 DISALLOW_COPY_AND_ASSIGN(DefaultDisplayManager);
99 }; 96 };
100 97
101 } // namespace view_manager 98 } // namespace view_manager
102 99
103 #endif // SERVICES_VIEW_MANAGER_DISPLAY_MANAGER_H_ 100 #endif // SERVICES_VIEW_MANAGER_DISPLAY_MANAGER_H_
OLDNEW
« no previous file with comments | « services/surfaces/surfaces_impl.cc ('k') | services/view_manager/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698