OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 // Last known dimensions of plugin | 152 // Last known dimensions of plugin |
153 int prev_width_; | 153 int prev_width_; |
154 int prev_height_; | 154 int prev_height_; |
155 | 155 |
156 o3d::NPV8Bridge np_v8_bridge_; | 156 o3d::NPV8Bridge np_v8_bridge_; |
157 scoped_ptr<StreamManager> stream_manager_; | 157 scoped_ptr<StreamManager> stream_manager_; |
158 | 158 |
159 public: | 159 public: |
160 #ifdef OS_WIN | 160 #ifdef OS_WIN |
161 void SetDefaultPluginWindowProc(WNDPROC proc) { | |
162 default_plugin_window_proc_ = proc; | |
163 } | |
164 WNDPROC GetDefaultPluginWindowProc() { | |
165 return default_plugin_window_proc_; | |
166 } | |
167 void SetHWnd(HWND hWnd) { | 161 void SetHWnd(HWND hWnd) { |
168 hWnd_ = hWnd; | 162 hWnd_ = hWnd; |
169 } | 163 } |
170 HWND GetHWnd() { | 164 HWND GetHWnd() { |
171 return hWnd_; | 165 return hWnd_; |
172 } | 166 } |
173 void SetFullscreenHWnd(HWND hWnd) { | |
174 fullscreen_hWnd_ = hWnd; | |
175 } | |
176 HWND GetFullscreenHWnd() { | |
177 return fullscreen_hWnd_; | |
178 } | |
179 void SetParentHWnd(HWND hWnd) { | |
180 parent_hWnd_ = hWnd; | |
181 } | |
182 HWND GetParentHWnd() { | |
183 return parent_hWnd_; | |
184 } | |
185 void SetPluginHWnd(HWND hWnd) { | 167 void SetPluginHWnd(HWND hWnd) { |
186 plugin_hWnd_ = hWnd; | 168 plugin_hWnd_ = hWnd; |
187 } | 169 } |
188 HWND GetPluginHWnd() { | 170 HWND GetPluginHWnd() { |
189 return plugin_hWnd_; | 171 return plugin_hWnd_; |
190 } | 172 } |
| 173 void SetContentHWnd(HWND hWnd) { |
| 174 content_hWnd_ = hWnd; |
| 175 } |
| 176 HWND GetContentHWnd() { |
| 177 return content_hWnd_; |
| 178 } |
191 bool RecordPaint() { | 179 bool RecordPaint() { |
192 bool painted = painted_once_; | 180 bool painted = painted_once_; |
193 painted_once_ = true; | 181 painted_once_ = true; |
194 return painted; | 182 return painted; |
195 } | 183 } |
196 bool got_dblclick() const { return got_dblclick_; } | 184 bool got_dblclick() const { return got_dblclick_; } |
197 void set_got_dblclick(bool got_dblclick) { got_dblclick_ = got_dblclick; } | 185 void set_got_dblclick(bool got_dblclick) { got_dblclick_ = got_dblclick; } |
198 #endif | 186 #endif |
199 #ifdef OS_MACOSX | 187 #ifdef OS_MACOSX |
200 void SetFullscreenOverlayMacWindow(WindowRef window) { | 188 void SetFullscreenOverlayMacWindow(WindowRef window) { |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 #endif | 412 #endif |
425 | 413 |
426 private: | 414 private: |
427 bool fullscreen_region_valid_; | 415 bool fullscreen_region_valid_; |
428 int fullscreen_region_x_; | 416 int fullscreen_region_x_; |
429 int fullscreen_region_y_; | 417 int fullscreen_region_y_; |
430 int fullscreen_region_width_; | 418 int fullscreen_region_width_; |
431 int fullscreen_region_height_; | 419 int fullscreen_region_height_; |
432 int fullscreen_region_mode_id_; | 420 int fullscreen_region_mode_id_; |
433 #ifdef OS_WIN | 421 #ifdef OS_WIN |
434 HWND hWnd_; // The window we are currenlty drawing to (use this) | 422 HWND hWnd_; // The window we are currently drawing to (use this). |
435 HWND fullscreen_hWnd_; // The fullscreen window if we are fullscreen | 423 HWND plugin_hWnd_; // The window we were given inside the browser. |
436 HWND parent_hWnd_; | 424 HWND content_hWnd_; // The window containing the D3D or OpenGL content. |
437 HWND plugin_hWnd_; // The window we were given inside the browser. | |
438 HCURSOR cursors_[o3d::Cursor::NUM_CURSORS]; // loaded windows cursors. | 425 HCURSOR cursors_[o3d::Cursor::NUM_CURSORS]; // loaded windows cursors. |
439 HCURSOR hCursor_; | 426 HCURSOR hCursor_; |
440 WNDPROC default_plugin_window_proc_; | |
441 bool painted_once_; | 427 bool painted_once_; |
442 #endif // OS_WIN | 428 #endif // OS_WIN |
443 }; | 429 }; |
444 | 430 |
445 } // namespace o3d | 431 } // namespace o3d |
446 } // namespace glue | 432 } // namespace glue |
447 | 433 |
448 | 434 |
449 #endif // O3D_PLUGIN_CROSS_O3D_GLUE_H_ | 435 #endif // O3D_PLUGIN_CROSS_O3D_GLUE_H_ |
OLD | NEW |