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

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

Issue 685013002: Refactors event dispatching of NativeViewport into its own interface (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: cleanup Created 6 years, 1 month 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
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 MOJO_SERVICES_VIEW_MANAGER_DISPLAY_MANAGER_H_ 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_DISPLAY_MANAGER_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_DISPLAY_MANAGER_H_ 6 #define MOJO_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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 bool in_setup() const { return in_setup_; } 49 bool in_setup() const { return in_setup_; }
50 50
51 private: 51 private:
52 void OnCreatedNativeViewport(uint64_t native_viewport_id); 52 void OnCreatedNativeViewport(uint64_t native_viewport_id);
53 void OnSurfaceConnectionCreated(SurfacePtr surface, uint32_t id_namespace); 53 void OnSurfaceConnectionCreated(SurfacePtr surface, uint32_t id_namespace);
54 void Draw(); 54 void Draw();
55 55
56 // NativeViewportClient implementation. 56 // NativeViewportClient implementation.
57 void OnDestroyed() override; 57 void OnDestroyed() override;
58 void OnSizeChanged(SizePtr size) override; 58 void OnSizeChanged(SizePtr size) override;
59 void OnEvent(EventPtr event, const mojo::Callback<void()>& callback) override;
60 59
61 // SurfaceClient implementation. 60 // SurfaceClient implementation.
62 void ReturnResources(Array<ReturnedResourcePtr> resources) override; 61 void ReturnResources(Array<ReturnedResourcePtr> resources) override;
63 62
64 ConnectionManager* connection_manager_; 63 ConnectionManager* connection_manager_;
65 64
66 // Returns true if adding the root view's window to |window_tree_host_|. 65 // Returns true if adding the root view's window to |window_tree_host_|.
67 bool in_setup_; 66 bool in_setup_;
68 67
69 gfx::Size size_; 68 gfx::Size size_;
70 gfx::Rect dirty_rect_; 69 gfx::Rect dirty_rect_;
71 base::Timer draw_timer_; 70 base::Timer draw_timer_;
72 71
73 SurfacesServicePtr surfaces_service_; 72 SurfacesServicePtr surfaces_service_;
74 SurfacePtr surface_; 73 SurfacePtr surface_;
75 scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; 74 scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
76 cc::SurfaceId surface_id_; 75 cc::SurfaceId surface_id_;
77 NativeViewportPtr native_viewport_; 76 NativeViewportPtr native_viewport_;
78 Callback<void()> native_viewport_closed_callback_; 77 Callback<void()> native_viewport_closed_callback_;
79 base::WeakPtrFactory<DisplayManager> weak_factory_; 78 base::WeakPtrFactory<DisplayManager> weak_factory_;
80 79
81 DISALLOW_COPY_AND_ASSIGN(DisplayManager); 80 DISALLOW_COPY_AND_ASSIGN(DisplayManager);
82 }; 81 };
83 82
84 } // namespace service 83 } // namespace service
85 } // namespace mojo 84 } // namespace mojo
86 85
87 #endif // MOJO_SERVICES_VIEW_MANAGER_DISPLAY_MANAGER_H_ 86 #endif // MOJO_SERVICES_VIEW_MANAGER_DISPLAY_MANAGER_H_
OLDNEW
« no previous file with comments | « mojo/services/view_manager/connection_manager.cc ('k') | mojo/services/view_manager/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698