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