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

Unified Diff: services/ui/demo/mus_demo.h

Issue 2679213003: Refactor Mus demo to prepare support for multiple external windows (Closed)
Patch Set: Use a class instead of a struct to improve data separation. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | services/ui/demo/mus_demo.cc » ('j') | services/ui/demo/mus_demo.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/demo/mus_demo.h
diff --git a/services/ui/demo/mus_demo.h b/services/ui/demo/mus_demo.h
index c4e490b6ce599a79f2a5b331e684962ae9645540..55112dadbc22d512d8e755a09b804ba9e90ddb24 100644
--- a/services/ui/demo/mus_demo.h
+++ b/services/ui/demo/mus_demo.h
@@ -28,10 +28,6 @@ class DefaultCaptureClient;
}
} // namespace aura
-namespace aura_extra {
-class ImageWindowDelegate;
-}
-
namespace wm {
class WMState;
}
@@ -98,12 +94,7 @@ class MusDemo : public service_manager::Service,
bool IsWindowActive(aura::Window* window) override;
void OnWmDeactivateWindow(aura::Window* window) override;
- // Draws one frame, incrementing the rotation angle.
- void DrawFrame();
-
- aura::Window* root_window_ = nullptr;
std::unique_ptr<aura::WindowTreeClient> window_tree_client_;
- std::unique_ptr<aura::WindowTreeHostMus> window_tree_host_;
std::unique_ptr<aura::Env> env_;
std::unique_ptr<display::ScreenBase> screen_;
@@ -111,20 +102,8 @@ class MusDemo : public service_manager::Service,
std::unique_ptr<::wm::WMState> wm_state_;
std::unique_ptr<aura::PropertyConverter> property_converter_;
- // Window to which we draw the bitmap.
- std::unique_ptr<aura::Window> bitmap_window_;
-
- // Destroys itself when the window gets destroyed.
- aura_extra::ImageWindowDelegate* window_delegate_ = nullptr;
-
- // Timer for calling DrawFrame().
- base::RepeatingTimer timer_;
-
- // Current rotation angle for drawing.
- double angle_ = 0.0;
-
- // Last time a frame was drawn.
- base::TimeTicks last_draw_frame_time_;
+ class WindowTreeData;
+ std::unique_ptr<WindowTreeData> window_tree_data_;
DISALLOW_COPY_AND_ASSIGN(MusDemo);
};
« no previous file with comments | « no previous file | services/ui/demo/mus_demo.cc » ('j') | services/ui/demo/mus_demo.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698