OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "gpu/np_utils/np_browser.h" | 5 #include "gpu/np_utils/np_browser.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 | |
8 #if defined(O3D_IN_CHROME) | |
9 #include "webkit/glue/plugins/nphostapi.h" | 7 #include "webkit/glue/plugins/nphostapi.h" |
10 #else | |
11 #include "o3d/third_party/npapi/include/npfunctions.h" | |
12 #endif | |
13 | 8 |
14 namespace np_utils { | 9 namespace np_utils { |
15 | 10 |
16 NPBrowser* NPBrowser::browser_; | 11 NPBrowser* NPBrowser::browser_; |
17 | 12 |
18 NPBrowser::NPBrowser(NPNetscapeFuncs* funcs) | 13 NPBrowser::NPBrowser(NPNetscapeFuncs* funcs) |
19 : netscape_funcs_(funcs) { | 14 : netscape_funcs_(funcs) { |
20 // Make this the first browser in the linked list. | 15 // Make this the first browser in the linked list. |
21 previous_browser_ = browser_; | 16 previous_browser_ = browser_; |
22 browser_ = this; | 17 browser_ = this; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 bool repeat, | 114 bool repeat, |
120 TimerProc callback) { | 115 TimerProc callback) { |
121 return netscape_funcs_->scheduletimer(npp, interval, repeat, callback); | 116 return netscape_funcs_->scheduletimer(npp, interval, repeat, callback); |
122 } | 117 } |
123 | 118 |
124 void NPBrowser::UnscheduleTimer(NPP npp, uint32 timer_id) { | 119 void NPBrowser::UnscheduleTimer(NPP npp, uint32 timer_id) { |
125 netscape_funcs_->unscheduletimer(npp, timer_id); | 120 netscape_funcs_->unscheduletimer(npp, timer_id); |
126 } | 121 } |
127 | 122 |
128 } // namespace np_utils | 123 } // namespace np_utils |
OLD | NEW |