| 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 "content/renderer/browser_plugin/browser_plugin.h" | 5 #include "content/renderer/browser_plugin/browser_plugin.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #if defined (OS_WIN) | 9 #if defined (OS_WIN) |
| 10 #include "base/sys_info.h" | 10 #include "base/sys_info.h" |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 const WebVector<WebRect>& cut_outs_rects, | 686 const WebVector<WebRect>& cut_outs_rects, |
| 687 bool is_visible) { | 687 bool is_visible) { |
| 688 int old_width = width(); | 688 int old_width = width(); |
| 689 int old_height = height(); | 689 int old_height = height(); |
| 690 plugin_rect_ = window_rect; | 690 plugin_rect_ = window_rect; |
| 691 if (old_width == window_rect.width && | 691 if (old_width == window_rect.width && |
| 692 old_height == window_rect.height) { | 692 old_height == window_rect.height) { |
| 693 return; | 693 return; |
| 694 } | 694 } |
| 695 | 695 |
| 696 const size_t stride = skia::PlatformCanvas::StrideForWidth(window_rect.width); | 696 const size_t stride = skia::PlatformCanvasStrideForWidth(window_rect.width); |
| 697 // Make sure the size of the damage buffer is at least four bytes so that we | 697 // Make sure the size of the damage buffer is at least four bytes so that we |
| 698 // can fit in a magic word to verify that the memory is shared correctly. | 698 // can fit in a magic word to verify that the memory is shared correctly. |
| 699 size_t size = | 699 size_t size = |
| 700 std::max(sizeof(unsigned int), | 700 std::max(sizeof(unsigned int), |
| 701 static_cast<size_t>(window_rect.height * | 701 static_cast<size_t>(window_rect.height * |
| 702 stride * | 702 stride * |
| 703 GetDeviceScaleFactor() * | 703 GetDeviceScaleFactor() * |
| 704 GetDeviceScaleFactor())); | 704 GetDeviceScaleFactor())); |
| 705 | 705 |
| 706 // Don't drop the old damage buffer until after we've made sure that the | 706 // Don't drop the old damage buffer until after we've made sure that the |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 void* notify_data) { | 890 void* notify_data) { |
| 891 } | 891 } |
| 892 | 892 |
| 893 void BrowserPlugin::didFailLoadingFrameRequest( | 893 void BrowserPlugin::didFailLoadingFrameRequest( |
| 894 const WebKit::WebURL& url, | 894 const WebKit::WebURL& url, |
| 895 void* notify_data, | 895 void* notify_data, |
| 896 const WebKit::WebURLError& error) { | 896 const WebKit::WebURLError& error) { |
| 897 } | 897 } |
| 898 | 898 |
| 899 } // namespace content | 899 } // namespace content |
| OLD | NEW |