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

Side by Side Diff: components/mus/ws/display_manager.h

Issue 1605773004: mus: Implement Window Server Capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Original Review Comments Created 4 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
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 COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ 5 #ifndef COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_
6 #define COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ 6 #define COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 virtual void Init(DisplayManagerDelegate* delegate) = 0; 65 virtual void Init(DisplayManagerDelegate* delegate) = 0;
66 66
67 // Schedules a paint for the specified region in the coordinates of |window|. 67 // Schedules a paint for the specified region in the coordinates of |window|.
68 virtual void SchedulePaint(const ServerWindow* window, 68 virtual void SchedulePaint(const ServerWindow* window,
69 const gfx::Rect& bounds) = 0; 69 const gfx::Rect& bounds) = 0;
70 70
71 virtual void SetViewportSize(const gfx::Size& size) = 0; 71 virtual void SetViewportSize(const gfx::Size& size) = 0;
72 72
73 virtual void SetTitle(const base::string16& title) = 0; 73 virtual void SetTitle(const base::string16& title) = 0;
74 74
75 virtual void SetCapture() = 0;
76
77 virtual void ReleaseCapture() = 0;
78
75 virtual void SetCursorById(int32_t cursor) = 0; 79 virtual void SetCursorById(int32_t cursor) = 0;
76 80
77 virtual const mojom::ViewportMetrics& GetViewportMetrics() = 0; 81 virtual const mojom::ViewportMetrics& GetViewportMetrics() = 0;
78 82
79 virtual void UpdateTextInputState(const ui::TextInputState& state) = 0; 83 virtual void UpdateTextInputState(const ui::TextInputState& state) = 0;
80 virtual void SetImeVisibility(bool visible) = 0; 84 virtual void SetImeVisibility(bool visible) = 0;
81 85
82 // Returns true if a compositor frame has been submitted but not drawn yet. 86 // Returns true if a compositor frame has been submitted but not drawn yet.
83 virtual bool IsFramePending() const = 0; 87 virtual bool IsFramePending() const = 0;
84 88
(...skipping 17 matching lines...) Expand all
102 const scoped_refptr<GpuState>& gpu_state, 106 const scoped_refptr<GpuState>& gpu_state,
103 const scoped_refptr<SurfacesState>& surfaces_state); 107 const scoped_refptr<SurfacesState>& surfaces_state);
104 ~DefaultDisplayManager() override; 108 ~DefaultDisplayManager() override;
105 109
106 // DisplayManager: 110 // DisplayManager:
107 void Init(DisplayManagerDelegate* delegate) override; 111 void Init(DisplayManagerDelegate* delegate) override;
108 void SchedulePaint(const ServerWindow* window, 112 void SchedulePaint(const ServerWindow* window,
109 const gfx::Rect& bounds) override; 113 const gfx::Rect& bounds) override;
110 void SetViewportSize(const gfx::Size& size) override; 114 void SetViewportSize(const gfx::Size& size) override;
111 void SetTitle(const base::string16& title) override; 115 void SetTitle(const base::string16& title) override;
116 void SetCapture() override;
117 void ReleaseCapture() override;
112 void SetCursorById(int32_t cursor) override; 118 void SetCursorById(int32_t cursor) override;
113 const mojom::ViewportMetrics& GetViewportMetrics() override; 119 const mojom::ViewportMetrics& GetViewportMetrics() override;
114 void UpdateTextInputState(const ui::TextInputState& state) override; 120 void UpdateTextInputState(const ui::TextInputState& state) override;
115 void SetImeVisibility(bool visible) override; 121 void SetImeVisibility(bool visible) override;
116 bool IsFramePending() const override; 122 bool IsFramePending() const override;
117 123
118 private: 124 private:
119 void WantToDraw(); 125 void WantToDraw();
120 126
121 // This method initiates a top level redraw of the display. 127 // This method initiates a top level redraw of the display.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 base::WeakPtrFactory<DefaultDisplayManager> weak_factory_; 169 base::WeakPtrFactory<DefaultDisplayManager> weak_factory_;
164 170
165 DISALLOW_COPY_AND_ASSIGN(DefaultDisplayManager); 171 DISALLOW_COPY_AND_ASSIGN(DefaultDisplayManager);
166 }; 172 };
167 173
168 } // namespace ws 174 } // namespace ws
169 175
170 } // namespace mus 176 } // namespace mus
171 177
172 #endif // COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_ 178 #endif // COMPONENTS_MUS_WS_DISPLAY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698