| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_ | 5 #ifndef EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_ |
| 6 #define EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_ | 6 #define EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_ |
| 7 | 7 |
| 8 #include "mojo/ui/ganesh_view.h" | 8 #include "mojo/ui/ganesh_view.h" |
| 9 | 9 |
| 10 class SkCanvas; | 10 class SkCanvas; |
| 11 | 11 |
| 12 namespace examples { | 12 namespace examples { |
| 13 | 13 |
| 14 class ShapesView : public mojo::ui::GaneshView { | 14 class ShapesView : public mojo::ui::GaneshView { |
| 15 public: | 15 public: |
| 16 ShapesView(mojo::ApplicationImpl* app_impl, | 16 ShapesView(mojo::InterfaceHandle<mojo::ApplicationConnector> app_connector, |
| 17 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request); | 17 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request); |
| 18 | 18 |
| 19 ~ShapesView() override; | 19 ~ShapesView() override; |
| 20 | 20 |
| 21 private: | 21 private: |
| 22 // |GaneshView|: | 22 // |GaneshView|: |
| 23 void OnPropertiesChanged(uint32_t old_scene_version, | 23 void OnPropertiesChanged(uint32_t old_scene_version, |
| 24 mojo::ui::ViewPropertiesPtr old_properties) override; | 24 mojo::ui::ViewPropertiesPtr old_properties) override; |
| 25 | 25 |
| 26 void UpdateScene(); | 26 void UpdateScene(); |
| 27 void DrawContent(const mojo::skia::GaneshContext::Scope& ganesh_scope, | 27 void DrawContent(const mojo::skia::GaneshContext::Scope& ganesh_scope, |
| 28 const mojo::Size& size, | 28 const mojo::Size& size, |
| 29 SkCanvas* canvas); | 29 SkCanvas* canvas); |
| 30 | 30 |
| 31 DISALLOW_COPY_AND_ASSIGN(ShapesView); | 31 DISALLOW_COPY_AND_ASSIGN(ShapesView); |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 } // namespace examples | 34 } // namespace examples |
| 35 | 35 |
| 36 #endif // EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_ | 36 #endif // EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_ |
| OLD | NEW |