| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 } | 104 } |
| 105 | 105 |
| 106 void WebPluginDelegateImpl::PlatformDestroyInstance() { | 106 void WebPluginDelegateImpl::PlatformDestroyInstance() { |
| 107 // Nothing to do here. | 107 // Nothing to do here. |
| 108 } | 108 } |
| 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 cairo_t* context = skia::BeginPlatformPaint(canvas); | 114 skia::ScopedPlatformPaint scoped_platform_paint(canvas); |
| 115 cairo_t* context = scoped_platform_paint.GetPlatformSurface(); |
| 115 WindowlessPaint(context, rect); | 116 WindowlessPaint(context, rect); |
| 116 skia::EndPlatformPaint(canvas); | |
| 117 } | 117 } |
| 118 | 118 |
| 119 void WebPluginDelegateImpl::InstallMissingPlugin() { | 119 void WebPluginDelegateImpl::InstallMissingPlugin() { |
| 120 NOTIMPLEMENTED(); | 120 NOTIMPLEMENTED(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 bool WebPluginDelegateImpl::WindowedCreatePlugin() { | 123 bool WebPluginDelegateImpl::WindowedCreatePlugin() { |
| 124 DCHECK(!windowed_handle_); | 124 DCHECK(!windowed_handle_); |
| 125 DCHECK(!plug_); | 125 DCHECK(!plug_); |
| 126 | 126 |
| (...skipping 632 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. | 759 // as someone might be setting the cursor in the main process as well. |
| 760 *cursor = current_windowless_cursor_; | 760 *cursor = current_windowless_cursor_; |
| 761 } | 761 } |
| 762 #endif | 762 #endif |
| 763 | 763 |
| 764 return ret; | 764 return ret; |
| 765 } | 765 } |
| 766 | 766 |
| 767 } // namespace npapi | 767 } // namespace npapi |
| 768 } // namespace webkit | 768 } // namespace webkit |
| OLD | NEW |