OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_UI_DEMO_MUS_DEMO_H_ | 5 #ifndef SERVICES_UI_DEMO_MUS_DEMO_H_ |
6 #define SERVICES_UI_DEMO_MUS_DEMO_H_ | 6 #define SERVICES_UI_DEMO_MUS_DEMO_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/timer/timer.h" | 16 #include "base/timer/timer.h" |
17 #include "services/service_manager/public/cpp/service.h" | 17 #include "services/service_manager/public/cpp/service.h" |
18 #include "third_party/skia/include/core/SkBitmap.h" | |
19 #include "ui/aura/mus/window_manager_delegate.h" | 18 #include "ui/aura/mus/window_manager_delegate.h" |
20 #include "ui/aura/mus/window_tree_client_delegate.h" | 19 #include "ui/aura/mus/window_tree_client_delegate.h" |
21 #include "ui/display/screen_base.h" | 20 #include "ui/display/screen_base.h" |
22 | 21 |
23 namespace aura { | 22 namespace aura { |
24 class Env; | 23 class Env; |
25 class PropertyConverter; | 24 class PropertyConverter; |
26 | 25 |
27 namespace client { | 26 namespace client { |
28 class DefaultCaptureClient; | 27 class DefaultCaptureClient; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 std::unique_ptr<aura::client::DefaultCaptureClient> capture_client_; | 113 std::unique_ptr<aura::client::DefaultCaptureClient> capture_client_; |
115 std::unique_ptr<::wm::WMState> wm_state_; | 114 std::unique_ptr<::wm::WMState> wm_state_; |
116 std::unique_ptr<aura::PropertyConverter> property_converter_; | 115 std::unique_ptr<aura::PropertyConverter> property_converter_; |
117 | 116 |
118 // Window to which we draw the bitmap. | 117 // Window to which we draw the bitmap. |
119 std::unique_ptr<aura::Window> bitmap_window_; | 118 std::unique_ptr<aura::Window> bitmap_window_; |
120 | 119 |
121 // Destroys itself when the window gets destroyed. | 120 // Destroys itself when the window gets destroyed. |
122 aura_extra::ImageWindowDelegate* window_delegate_ = nullptr; | 121 aura_extra::ImageWindowDelegate* window_delegate_ = nullptr; |
123 | 122 |
124 // Bitmap that is the same size as our client window area. | |
125 SkBitmap bitmap_; | |
126 | |
127 // Timer for calling DrawFrame(). | 123 // Timer for calling DrawFrame(). |
128 base::RepeatingTimer timer_; | 124 base::RepeatingTimer timer_; |
129 | 125 |
130 // Current rotation angle for drawing. | 126 // Current rotation angle for drawing. |
131 double angle_ = 0.0; | 127 double angle_ = 0.0; |
132 | 128 |
133 // Last time a frame was drawn. | 129 // Last time a frame was drawn. |
134 base::TimeTicks last_draw_frame_time_; | 130 base::TimeTicks last_draw_frame_time_; |
135 | 131 |
136 DISALLOW_COPY_AND_ASSIGN(MusDemo); | 132 DISALLOW_COPY_AND_ASSIGN(MusDemo); |
137 }; | 133 }; |
138 | 134 |
139 } // namespace demo | 135 } // namespace demo |
140 } // namespace aura | 136 } // namespace aura |
141 | 137 |
142 #endif // SERVICES_UI_DEMO_MUS_DEMO_H_ | 138 #endif // SERVICES_UI_DEMO_MUS_DEMO_H_ |
OLD | NEW |