OLD | NEW |
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 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 | 1169 |
1170 // Don't do optimized painting if the area to paint intersects with the | 1170 // Don't do optimized painting if the area to paint intersects with the |
1171 // cut-out rects, otherwise we will paint over them. | 1171 // cut-out rects, otherwise we will paint over them. |
1172 for (std::vector<gfx::Rect>::const_iterator iter = cut_outs_rects_.begin(); | 1172 for (std::vector<gfx::Rect>::const_iterator iter = cut_outs_rects_.begin(); |
1173 iter != cut_outs_rects_.end(); ++iter) { | 1173 iter != cut_outs_rects_.end(); ++iter) { |
1174 if (relative_paint_bounds.Intersects(*iter)) | 1174 if (relative_paint_bounds.Intersects(*iter)) |
1175 return false; | 1175 return false; |
1176 } | 1176 } |
1177 | 1177 |
1178 *dib = image_data->PlatformImage()->GetTransportDIB(); | 1178 *dib = image_data->PlatformImage()->GetTransportDIB(); |
1179 plugin_backing_store_rect.Offset(plugin_origin); | 1179 plugin_backing_store_rect.Offset(plugin_origin.OffsetFromOrigin()); |
1180 *location = plugin_backing_store_rect; | 1180 *location = plugin_backing_store_rect; |
1181 clip_page.Offset(plugin_origin); | 1181 clip_page.Offset(plugin_origin.OffsetFromOrigin()); |
1182 *clip = clip_page; | 1182 *clip = clip_page; |
1183 // The plugin scale factor is inverted, e.g. for a device scale factor of 2x | 1183 // The plugin scale factor is inverted, e.g. for a device scale factor of 2x |
1184 // the plugin scale factor is 0.5. | 1184 // the plugin scale factor is 0.5. |
1185 *scale_factor = 1.0 / scale; | 1185 *scale_factor = 1.0 / scale; |
1186 return true; | 1186 return true; |
1187 } | 1187 } |
1188 | 1188 |
1189 string16 PluginInstance::GetSelectedText(bool html) { | 1189 string16 PluginInstance::GetSelectedText(bool html) { |
1190 // Keep a reference on the stack. See NOTE above. | 1190 // Keep a reference on the stack. See NOTE above. |
1191 scoped_refptr<PluginInstance> ref(this); | 1191 scoped_refptr<PluginInstance> ref(this); |
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3208 screen_size_for_fullscreen_ = gfx::Size(); | 3208 screen_size_for_fullscreen_ = gfx::Size(); |
3209 WebElement element = container_->element(); | 3209 WebElement element = container_->element(); |
3210 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 3210 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
3211 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 3211 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
3212 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 3212 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
3213 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 3213 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
3214 } | 3214 } |
3215 | 3215 |
3216 } // namespace ppapi | 3216 } // namespace ppapi |
3217 } // namespace webkit | 3217 } // namespace webkit |
OLD | NEW |