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

Side by Side Diff: mojo/services/surfaces/surfaces_service_application.cc

Issue 361123002: Mojo surfaces service and example app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « mojo/services/surfaces/surfaces_service_application.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "mojo/services/surfaces/surfaces_service_application.h"
6
7 #include "cc/surfaces/display.h"
8
9 namespace mojo {
10 namespace surfaces {
11
12 SurfacesServiceApplication::SurfacesServiceApplication()
13 : next_id_namespace_(1u), display_(NULL) {
14 }
15
16 SurfacesServiceApplication::~SurfacesServiceApplication() {
17 }
18
19 bool SurfacesServiceApplication::ConfigureIncomingConnection(
20 ApplicationConnection* connection) {
21 connection->AddService<SurfacesImpl, SurfacesImpl::Context>(this);
22 return true;
23 }
24
25 cc::SurfaceManager* SurfacesServiceApplication::Manager() {
26 return &manager_;
27 }
28
29 uint32_t SurfacesServiceApplication::IdNamespace() {
30 return next_id_namespace_++;
31 }
32
33 void SurfacesServiceApplication::FrameSubmitted() {
34 if (display_)
35 display_->Draw();
36 }
37
38 void SurfacesServiceApplication::SetDisplay(cc::Display* display) {
39 display_ = display;
40 }
41
42 } // namespace surfaces
43
44 // static
45 ApplicationDelegate* ApplicationDelegate::Create() {
46 return new surfaces::SurfacesServiceApplication;
47 }
48
49 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/surfaces/surfaces_service_application.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698