| 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 "webkit/glue/plugins/webplugin_delegate_impl.h" | 5 #include "webkit/glue/plugins/webplugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 PlatformDestroyInstance(); | 132 PlatformDestroyInstance(); |
| 133 | 133 |
| 134 instance_ = 0; | 134 instance_ = 0; |
| 135 } | 135 } |
| 136 } | 136 } |
| 137 | 137 |
| 138 void WebPluginDelegateImpl::UpdateGeometry( | 138 void WebPluginDelegateImpl::UpdateGeometry( |
| 139 const gfx::Rect& window_rect, | 139 const gfx::Rect& window_rect, |
| 140 const gfx::Rect& clip_rect) { | 140 const gfx::Rect& clip_rect) { |
| 141 |
| 142 if (first_set_window_call_) { |
| 143 first_set_window_call_ = false; |
| 144 // Plugins like media player on Windows have a bug where in they handle the |
| 145 // first geometry update and ignore the rest resulting in painting issues. |
| 146 // This quirk basically ignores the first set window call sequence for |
| 147 // these plugins and has been tested for Windows plugins only. |
| 148 if (quirks_ & PLUGIN_QUIRK_IGNORE_FIRST_SETWINDOW_CALL) |
| 149 return; |
| 150 } |
| 151 |
| 141 if (windowless_) { | 152 if (windowless_) { |
| 142 WindowlessUpdateGeometry(window_rect, clip_rect); | 153 WindowlessUpdateGeometry(window_rect, clip_rect); |
| 143 } else { | 154 } else { |
| 144 WindowedUpdateGeometry(window_rect, clip_rect); | 155 WindowedUpdateGeometry(window_rect, clip_rect); |
| 145 } | 156 } |
| 146 } | 157 } |
| 147 | 158 |
| 148 NPObject* WebPluginDelegateImpl::GetPluginScriptableObject() { | 159 NPObject* WebPluginDelegateImpl::GetPluginScriptableObject() { |
| 149 return instance_->GetPluginScriptableObject(); | 160 return instance_->GetPluginScriptableObject(); |
| 150 } | 161 } |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 WebPluginResourceClient* WebPluginDelegateImpl::CreateResourceClient( | 259 WebPluginResourceClient* WebPluginDelegateImpl::CreateResourceClient( |
| 249 unsigned long resource_id, const GURL& url, int notify_id) { | 260 unsigned long resource_id, const GURL& url, int notify_id) { |
| 250 return instance()->CreateStream( | 261 return instance()->CreateStream( |
| 251 resource_id, url, std::string(), notify_id); | 262 resource_id, url, std::string(), notify_id); |
| 252 } | 263 } |
| 253 | 264 |
| 254 WebPluginResourceClient* WebPluginDelegateImpl::CreateSeekableResourceClient( | 265 WebPluginResourceClient* WebPluginDelegateImpl::CreateSeekableResourceClient( |
| 255 unsigned long resource_id, int range_request_id) { | 266 unsigned long resource_id, int range_request_id) { |
| 256 return instance()->GetRangeRequest(range_request_id); | 267 return instance()->GetRangeRequest(range_request_id); |
| 257 } | 268 } |
| OLD | NEW |