| 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/plugins/ppapi/ppb_widget_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_widget_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ppapi/c/dev/ppb_widget_dev.h" | 8 #include "ppapi/c/dev/ppb_widget_dev.h" |
| 9 #include "ppapi/c/dev/ppp_widget_dev.h" | 9 #include "ppapi/c/dev/ppp_widget_dev.h" |
| 10 #include "ppapi/c/pp_completion_callback.h" | 10 #include "ppapi/c/pp_completion_callback.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 &Paint, | 63 &Paint, |
| 64 &HandleEvent, | 64 &HandleEvent, |
| 65 &GetLocation, | 65 &GetLocation, |
| 66 &SetLocation, | 66 &SetLocation, |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace | 69 } // namespace |
| 70 | 70 |
| 71 PPB_Widget_Impl::PPB_Widget_Impl(PluginInstance* instance) | 71 PPB_Widget_Impl::PPB_Widget_Impl(PluginInstance* instance) |
| 72 : Resource(instance) { | 72 : Resource(instance) { |
| 73 memset(&location_, 0, sizeof(location_)); |
| 73 } | 74 } |
| 74 | 75 |
| 75 PPB_Widget_Impl::~PPB_Widget_Impl() { | 76 PPB_Widget_Impl::~PPB_Widget_Impl() { |
| 76 } | 77 } |
| 77 | 78 |
| 78 // static | 79 // static |
| 79 const PPB_Widget_Dev* PPB_Widget_Impl::GetInterface() { | 80 const PPB_Widget_Dev* PPB_Widget_Impl::GetInterface() { |
| 80 return &ppb_widget; | 81 return &ppb_widget; |
| 81 } | 82 } |
| 82 | 83 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 101 instance()->module()->GetPluginInterface(PPP_WIDGET_DEV_INTERFACE)); | 102 instance()->module()->GetPluginInterface(PPP_WIDGET_DEV_INTERFACE)); |
| 102 if (!widget) | 103 if (!widget) |
| 103 return; | 104 return; |
| 104 ScopedResourceId resource(this); | 105 ScopedResourceId resource(this); |
| 105 widget->Invalidate(instance()->pp_instance(), resource.id, dirty); | 106 widget->Invalidate(instance()->pp_instance(), resource.id, dirty); |
| 106 } | 107 } |
| 107 | 108 |
| 108 } // namespace ppapi | 109 } // namespace ppapi |
| 109 } // namespace webkit | 110 } // namespace webkit |
| 110 | 111 |
| OLD | NEW |