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

Side by Side Diff: examples/shadows/shadows_view.h

Issue 1991853003: Make BaseView et al. take an ApplicationConnector instead of an ApplicationImpl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh Created 4 years, 7 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
« no previous file with comments | « examples/shadows/shadows_app.cc ('k') | examples/shadows/shadows_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 EXAMPLES_SHADOWS_SHADOWS_VIEW_H_ 5 #ifndef EXAMPLES_SHADOWS_SHADOWS_VIEW_H_
6 #define EXAMPLES_SHADOWS_SHADOWS_VIEW_H_ 6 #define EXAMPLES_SHADOWS_SHADOWS_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "examples/shadows/shadows_renderer.h" 10 #include "examples/shadows/shadows_renderer.h"
11 #include "mojo/ui/choreographer.h" 11 #include "mojo/ui/choreographer.h"
12 #include "mojo/ui/gl_view.h" 12 #include "mojo/ui/gl_view.h"
13 13
14 namespace examples { 14 namespace examples {
15 15
16 class ShadowsView : public mojo::ui::GLView, 16 class ShadowsView : public mojo::ui::GLView,
17 public mojo::ui::ChoreographerDelegate { 17 public mojo::ui::ChoreographerDelegate {
18 public: 18 public:
19 ShadowsView(mojo::ApplicationImpl* app_impl, 19 ShadowsView(mojo::InterfaceHandle<mojo::ApplicationConnector> app_connector,
20 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request); 20 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request);
21 21
22 ~ShadowsView() override; 22 ~ShadowsView() override;
23 23
24 private: 24 private:
25 // |GLView|: 25 // |GLView|:
26 void OnPropertiesChanged(uint32_t old_scene_version, 26 void OnPropertiesChanged(uint32_t old_scene_version,
27 mojo::ui::ViewPropertiesPtr old_properties) override; 27 mojo::ui::ViewPropertiesPtr old_properties) override;
28 28
29 // |ChoreographerDelegate|: 29 // |ChoreographerDelegate|:
30 void OnDraw(const mojo::gfx::composition::FrameInfo& frame_info, 30 void OnDraw(const mojo::gfx::composition::FrameInfo& frame_info,
31 const base::TimeDelta& time_delta) override; 31 const base::TimeDelta& time_delta) override;
32 32
33 void Render(const mojo::GLContext::Scope& gl_scope, const mojo::Size& size); 33 void Render(const mojo::GLContext::Scope& gl_scope, const mojo::Size& size);
34 34
35 mojo::ui::Choreographer choreographer_; 35 mojo::ui::Choreographer choreographer_;
36 36
37 mojo::Size size_; 37 mojo::Size size_;
38 std::unique_ptr<ShadowsRenderer> renderer_; 38 std::unique_ptr<ShadowsRenderer> renderer_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(ShadowsView); 40 DISALLOW_COPY_AND_ASSIGN(ShadowsView);
41 }; 41 };
42 42
43 } // namespace examples 43 } // namespace examples
44 44
45 #endif // EXAMPLES_SHADOWS_SHADOWS_VIEW_H_ 45 #endif // EXAMPLES_SHADOWS_SHADOWS_VIEW_H_
OLDNEW
« no previous file with comments | « examples/shadows/shadows_app.cc ('k') | examples/shadows/shadows_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698