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/npapi/webplugin_delegate_impl.h" | 5 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 #include <gdk/gdkx.h> | 8 #include <gdk/gdkx.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 if (window_rect == window_rect_ && clip_rect == clip_rect_) | 171 if (window_rect == window_rect_ && clip_rect == clip_rect_) |
172 return false; | 172 return false; |
173 | 173 |
174 window_rect_ = window_rect; | 174 window_rect_ = window_rect; |
175 clip_rect_ = clip_rect; | 175 clip_rect_ = clip_rect; |
176 | 176 |
177 return true; | 177 return true; |
178 } | 178 } |
179 | 179 |
180 void WebPluginDelegateImpl::WindowedSetWindow() { | 180 void WebPluginDelegateImpl::WindowedSetWindow() { |
181 if (!instance_) | 181 if (!instance_.get()) |
182 return; | 182 return; |
183 | 183 |
184 if (!windowed_handle_) { | 184 if (!windowed_handle_) { |
185 NOTREACHED(); | 185 NOTREACHED(); |
186 return; | 186 return; |
187 } | 187 } |
188 | 188 |
189 // See https://bugzilla.mozilla.org/show_bug.cgi?id=108347 | 189 // See https://bugzilla.mozilla.org/show_bug.cgi?id=108347 |
190 // If we call NPP_SetWindow with a <= 0 width or height, problems arise in | 190 // If we call NPP_SetWindow with a <= 0 width or height, problems arise in |
191 // Flash (and possibly other plugins). | 191 // Flash (and possibly other plugins). |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 // as someone might be setting the cursor in the main process as well. | 746 // as someone might be setting the cursor in the main process as well. |
747 *cursor = current_windowless_cursor_; | 747 *cursor = current_windowless_cursor_; |
748 } | 748 } |
749 #endif | 749 #endif |
750 | 750 |
751 return ret; | 751 return ret; |
752 } | 752 } |
753 | 753 |
754 } // namespace npapi | 754 } // namespace npapi |
755 } // namespace webkit | 755 } // namespace webkit |
OLD | NEW |