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

Side by Side Diff: mojo/ui/gl_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 | « mojo/ui/ganesh_view.cc ('k') | mojo/ui/gl_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 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 MOJO_UI_GL_VIEW_H_ 5 #ifndef MOJO_UI_GL_VIEW_H_
6 #define MOJO_UI_GL_VIEW_H_ 6 #define MOJO_UI_GL_VIEW_H_
7 7
8 #include "mojo/gpu/gl_context.h" 8 #include "mojo/gpu/gl_context.h"
9 #include "mojo/ui/base_view.h" 9 #include "mojo/ui/base_view.h"
10 #include "mojo/ui/gl_renderer.h" 10 #include "mojo/ui/gl_renderer.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 namespace ui { 13 namespace ui {
14 14
15 // Abstract base implementation of the View interface for simple applications 15 // Abstract base implementation of the View interface for simple applications
16 // which use GL for rendering. Subclasses must handle layout and provide 16 // which use GL for rendering. Subclasses must handle layout and provide
17 // content for the scene. 17 // content for the scene.
18 class GLView : public BaseView { 18 class GLView : public BaseView {
19 public: 19 public:
20 GLView(mojo::ApplicationImpl* app_impl, 20 GLView(InterfaceHandle<ApplicationConnector> app_connector,
21 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request, 21 InterfaceRequest<ViewOwner> view_owner_request,
22 const std::string& label); 22 const std::string& label);
23 23
24 ~GLView() override; 24 ~GLView() override;
25 25
26 // Gets the GL context, never null. 26 // Gets the GL context, never null.
27 const scoped_refptr<mojo::GLContext>& gl_context() const { 27 const scoped_refptr<GLContext>& gl_context() const {
28 return gl_renderer_.gl_context(); 28 return gl_renderer_.gl_context();
29 } 29 }
30 30
31 // Gets the GL renderer, never null. 31 // Gets the GL renderer, never null.
32 mojo::ui::GLRenderer* gl_renderer() { return &gl_renderer_; } 32 GLRenderer* gl_renderer() { return &gl_renderer_; }
33 33
34 private: 34 private:
35 mojo::ui::GLRenderer gl_renderer_; 35 GLRenderer gl_renderer_;
36 36
37 MOJO_DISALLOW_COPY_AND_ASSIGN(GLView); 37 MOJO_DISALLOW_COPY_AND_ASSIGN(GLView);
38 }; 38 };
39 39
40 } // namespace ui 40 } // namespace ui
41 } // namespace mojo 41 } // namespace mojo
42 42
43 #endif // MOJO_UI_GL_VIEW_H_ 43 #endif // MOJO_UI_GL_VIEW_H_
OLDNEW
« no previous file with comments | « mojo/ui/ganesh_view.cc ('k') | mojo/ui/gl_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698