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

Side by Side Diff: native_client_sdk/src/examples/pong/pong_model.h

Issue 13106002: [NaCl SDK] A bunch of spelling fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix presubmit Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PONG_PONG_MODEL_H_ 5 #ifndef EXAMPLES_PONG_PONG_MODEL_H_
6 #define EXAMPLES_PONG_PONG_MODEL_H_ 6 #define EXAMPLES_PONG_PONG_MODEL_H_
7 7
8 #include "ppapi/cpp/rect.h" 8 #include "ppapi/cpp/rect.h"
9 #include "ppapi/cpp/size.h" 9 #include "ppapi/cpp/size.h"
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 int dx; 112 int dx;
113 int dy; 113 int dy;
114 }; 114 };
115 115
116 class PongModelDelegate { 116 class PongModelDelegate {
117 public: 117 public:
118 /** Called when the score changes, whether due to PongModel::SetScore, or 118 /** Called when the score changes, whether due to PongModel::SetScore, or
119 * when a player scores. */ 119 * when a player scores. */
120 virtual void OnScoreChanged() = 0; 120 virtual void OnScoreChanged() = 0;
121 /** Called only when a player scores, not when the score is changed 121 /** Called only when a player scores, not when the score is changed
122 * programatically. */ 122 * programmatically. */
123 virtual void OnPlayerScored() = 0; 123 virtual void OnPlayerScored() = 0;
124 }; 124 };
125 125
126 class PongModel { 126 class PongModel {
127 public: 127 public:
128 explicit PongModel(PongModelDelegate* delegate); 128 explicit PongModel(PongModelDelegate* delegate);
129 129
130 void SetCourtSize(const pp::Size& size); 130 void SetCourtSize(const pp::Size& size);
131 void SetScore(int left_score, int right_score); 131 void SetScore(int left_score, int right_score);
132 void ResetPositions(); 132 void ResetPositions();
(...skipping 11 matching lines...) Expand all
144 PongModelDelegate* delegate_; // Weak pointer. 144 PongModelDelegate* delegate_; // Weak pointer.
145 PaddleModel left_paddle_; 145 PaddleModel left_paddle_;
146 PaddleModel right_paddle_; 146 PaddleModel right_paddle_;
147 BallModel ball_; 147 BallModel ball_;
148 pp::Rect court_; 148 pp::Rect court_;
149 int left_score_; 149 int left_score_;
150 int right_score_; 150 int right_score_;
151 }; 151 };
152 152
153 #endif // EXAMPLES_PONG_PONG_MODEL_H_ 153 #endif // EXAMPLES_PONG_PONG_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698