OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas, | 110 void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas, |
111 const gfx::Rect& rect) { | 111 const gfx::Rect& rect) { |
112 if (!windowless_) | 112 if (!windowless_) |
113 return; | 113 return; |
114 skia::ScopedPlatformPaint scoped_platform_paint(canvas); | 114 skia::ScopedPlatformPaint scoped_platform_paint(canvas); |
115 cairo_t* context = scoped_platform_paint.GetPlatformSurface(); | 115 cairo_t* context = scoped_platform_paint.GetPlatformSurface(); |
116 WindowlessPaint(context, rect); | 116 WindowlessPaint(context, rect); |
117 } | 117 } |
118 | 118 |
119 void WebPluginDelegateImpl::InstallMissingPlugin() { | |
120 NOTIMPLEMENTED(); | |
121 } | |
122 | |
123 bool WebPluginDelegateImpl::WindowedCreatePlugin() { | 119 bool WebPluginDelegateImpl::WindowedCreatePlugin() { |
124 DCHECK(!windowed_handle_); | 120 DCHECK(!windowed_handle_); |
125 DCHECK(!plug_); | 121 DCHECK(!plug_); |
126 | 122 |
127 // NPP_GetValue() might write 4 bytes of data to this variable. Don't use a | 123 // NPP_GetValue() might write 4 bytes of data to this variable. Don't use a |
128 // single byte bool, use an int instead and make sure it is initialized. | 124 // single byte bool, use an int instead and make sure it is initialized. |
129 int xembed = 0; | 125 int xembed = 0; |
130 NPError err = instance_->NPP_GetValue(NPPVpluginNeedsXEmbed, &xembed); | 126 NPError err = instance_->NPP_GetValue(NPPVpluginNeedsXEmbed, &xembed); |
131 if (err != NPERR_NO_ERROR || !xembed) { | 127 if (err != NPERR_NO_ERROR || !xembed) { |
132 NOTIMPLEMENTED() << " windowed plugin but without xembed. " | 128 NOTIMPLEMENTED() << " windowed plugin but without xembed. " |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 // as someone might be setting the cursor in the main process as well. | 755 // as someone might be setting the cursor in the main process as well. |
760 *cursor = current_windowless_cursor_; | 756 *cursor = current_windowless_cursor_; |
761 } | 757 } |
762 #endif | 758 #endif |
763 | 759 |
764 return ret; | 760 return ret; |
765 } | 761 } |
766 | 762 |
767 } // namespace npapi | 763 } // namespace npapi |
768 } // namespace webkit | 764 } // namespace webkit |
OLD | NEW |