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 package org.chromium.chromoting.cardboard; | 5 package org.chromium.chromoting.cardboard; |
6 | 6 |
7 import android.content.Intent; | 7 import android.content.Intent; |
8 import android.graphics.PointF; | 8 import android.graphics.PointF; |
9 import android.os.Bundle; | 9 import android.os.Bundle; |
10 import android.speech.RecognitionListener; | 10 import android.speech.RecognitionListener; |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 @Override | 38 @Override |
39 public void onCreate(Bundle savedInstanceState) { | 39 public void onCreate(Bundle savedInstanceState) { |
40 super.onCreate(savedInstanceState); | 40 super.onCreate(savedInstanceState); |
41 setContentView(R.layout.cardboard_desktop); | 41 setContentView(R.layout.cardboard_desktop); |
42 | 42 |
43 mClient = Client.getInstance(); | 43 mClient = Client.getInstance(); |
44 | 44 |
45 mSwitchToDesktopActivity = false; | 45 mSwitchToDesktopActivity = false; |
46 CardboardView cardboardView = (CardboardView) findViewById(R.id.cardboar
d_view); | 46 CardboardView cardboardView = (CardboardView) findViewById(R.id.cardboar
d_view); |
47 mRenderer = new CardboardRenderer(this, mClient); | 47 |
| 48 // THE CODE BELOW IS BROKEN. |
| 49 // To make it work, you have to somehow get the reference to the Display
object and pass |
| 50 // it into the constructor. |
| 51 mRenderer = new CardboardRenderer(this, mClient, null); |
48 mIsListening = false; | 52 mIsListening = false; |
49 | 53 |
50 // Associate a CardboardView.StereoRenderer with cardboard view. | 54 // Associate a CardboardView.StereoRenderer with cardboard view. |
51 cardboardView.setRenderer(mRenderer); | 55 cardboardView.setRenderer(mRenderer); |
52 | 56 |
53 // Associate the cardboard view with this activity. | 57 // Associate the cardboard view with this activity. |
54 setCardboardView(cardboardView); | 58 setCardboardView(cardboardView); |
55 } | 59 } |
56 | 60 |
57 @Override | 61 @Override |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 } | 198 } |
195 } | 199 } |
196 | 200 |
197 public void onPartialResults(Bundle partialResults) { | 201 public void onPartialResults(Bundle partialResults) { |
198 } | 202 } |
199 | 203 |
200 public void onEvent(int eventType, Bundle params) { | 204 public void onEvent(int eventType, Bundle params) { |
201 } | 205 } |
202 } | 206 } |
203 } | 207 } |
OLD | NEW |