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 <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
(...skipping 32 matching lines...) Loading... |
43 windowed_did_set_window_(false), | 43 windowed_did_set_window_(false), |
44 windowless_(false), | 44 windowless_(false), |
45 plugin_(NULL), | 45 plugin_(NULL), |
46 instance_(instance), | 46 instance_(instance), |
47 pixmap_(NULL), | 47 pixmap_(NULL), |
48 first_event_time_(-1.0), | 48 first_event_time_(-1.0), |
49 plug_(NULL), | 49 plug_(NULL), |
50 socket_(NULL), | 50 socket_(NULL), |
51 parent_(containing_view), | 51 parent_(containing_view), |
52 quirks_(0), | 52 quirks_(0), |
53 handle_event_depth_(0) { | 53 handle_event_depth_(0), |
| 54 first_set_window_call_(true) { |
54 memset(&window_, 0, sizeof(window_)); | 55 memset(&window_, 0, sizeof(window_)); |
55 if (instance_->mime_type() == "application/x-shockwave-flash") { | 56 if (instance_->mime_type() == "application/x-shockwave-flash") { |
56 // Flash is tied to Firefox's whacky behavior with windowless plugins. See | 57 // Flash is tied to Firefox's whacky behavior with windowless plugins. See |
57 // comments in WindowlessPaint. | 58 // comments in WindowlessPaint. |
58 // TODO(viettrungluu): PLUGIN_QUIRK_WINDOWLESS_NO_RIGHT_CLICK: Don't allow | 59 // TODO(viettrungluu): PLUGIN_QUIRK_WINDOWLESS_NO_RIGHT_CLICK: Don't allow |
59 // right-clicks in windowless content since Flash 10.1 (initial release, at | 60 // right-clicks in windowless content since Flash 10.1 (initial release, at |
60 // least) hangs in that case. Remove this once Flash is fixed. | 61 // least) hangs in that case. Remove this once Flash is fixed. |
61 quirks_ |= PLUGIN_QUIRK_WINDOWLESS_OFFSET_WINDOW_TO_DRAW | 62 quirks_ |= PLUGIN_QUIRK_WINDOWLESS_OFFSET_WINDOW_TO_DRAW |
62 | PLUGIN_QUIRK_WINDOWLESS_INVALIDATE_AFTER_SET_WINDOW | 63 | PLUGIN_QUIRK_WINDOWLESS_INVALIDATE_AFTER_SET_WINDOW |
63 | PLUGIN_QUIRK_WINDOWLESS_NO_RIGHT_CLICK; | 64 | PLUGIN_QUIRK_WINDOWLESS_NO_RIGHT_CLICK; |
(...skipping 637 matching lines...) Loading... |
701 if (event->event == WM_MOUSEMOVE) { | 702 if (event->event == WM_MOUSEMOVE) { |
702 // Snag a reference to the current cursor ASAP in case the plugin modified | 703 // Snag a reference to the current cursor ASAP in case the plugin modified |
703 // it. There is a nasty race condition here with the multiprocess browser | 704 // it. There is a nasty race condition here with the multiprocess browser |
704 // as someone might be setting the cursor in the main process as well. | 705 // as someone might be setting the cursor in the main process as well. |
705 *cursor = current_windowless_cursor_; | 706 *cursor = current_windowless_cursor_; |
706 } | 707 } |
707 #endif | 708 #endif |
708 | 709 |
709 return ret; | 710 return ret; |
710 } | 711 } |
OLD | NEW |