OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/glue/plugins/pepper_plugin_instance.h" | 5 #include "webkit/glue/plugins/pepper_plugin_instance.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "gfx/rect.h" | 9 #include "gfx/rect.h" |
10 #include "third_party/ppapi/c/pp_instance.h" | 10 #include "third_party/ppapi/c/pp_instance.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 case PP_Event_Type_KeyUp: | 257 case PP_Event_Type_KeyUp: |
258 BuildKeyEvent(&event, &pp_event); | 258 BuildKeyEvent(&event, &pp_event); |
259 break; | 259 break; |
260 case PP_Event_Type_Char: | 260 case PP_Event_Type_Char: |
261 BuildCharEvent(&event, &pp_event); | 261 BuildCharEvent(&event, &pp_event); |
262 break; | 262 break; |
263 } | 263 } |
264 return instance_interface_->HandleEvent(GetPPInstance(), &pp_event); | 264 return instance_interface_->HandleEvent(GetPPInstance(), &pp_event); |
265 } | 265 } |
266 | 266 |
| 267 PP_Var PluginInstance::GetInstanceObject() { |
| 268 return instance_interface_->GetInstanceObject(GetPPInstance()); |
| 269 } |
| 270 |
267 void PluginInstance::ViewChanged(const gfx::Rect& position, | 271 void PluginInstance::ViewChanged(const gfx::Rect& position, |
268 const gfx::Rect& clip) { | 272 const gfx::Rect& clip) { |
269 PP_Rect pp_position, pp_clip; | 273 PP_Rect pp_position, pp_clip; |
270 RectToPPRect(position, &pp_position); | 274 RectToPPRect(position, &pp_position); |
271 RectToPPRect(clip, &pp_clip); | 275 RectToPPRect(clip, &pp_clip); |
272 instance_interface_->ViewChanged(GetPPInstance(), &pp_position, &pp_clip); | 276 instance_interface_->ViewChanged(GetPPInstance(), &pp_position, &pp_clip); |
273 } | 277 } |
274 | 278 |
275 } // namespace pepper | 279 } // namespace pepper |
OLD | NEW |