| 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/ppapi/ppapi_webplugin_impl.h" | 5 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // The object is expected to be retained before it is returned. | 115 // The object is expected to be retained before it is returned. |
| 116 WebKit::WebBindings::retainObject(message_channel_np_object); | 116 WebKit::WebBindings::retainObject(message_channel_np_object); |
| 117 return message_channel_np_object; | 117 return message_channel_np_object; |
| 118 } | 118 } |
| 119 | 119 |
| 120 bool WebPluginImpl::getFormValue(WebString* value) { | 120 bool WebPluginImpl::getFormValue(WebString* value) { |
| 121 return false; | 121 return false; |
| 122 } | 122 } |
| 123 | 123 |
| 124 void WebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) { | 124 void WebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) { |
| 125 if (!instance_->IsFullscreenOrPending()) | 125 if (!instance_->FlashIsFullscreenOrPending()) |
| 126 instance_->Paint(canvas, plugin_rect_, rect); | 126 instance_->Paint(canvas, plugin_rect_, rect); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void WebPluginImpl::updateGeometry( | 129 void WebPluginImpl::updateGeometry( |
| 130 const WebRect& window_rect, | 130 const WebRect& window_rect, |
| 131 const WebRect& clip_rect, | 131 const WebRect& clip_rect, |
| 132 const WebVector<WebRect>& cut_outs_rects, | 132 const WebVector<WebRect>& cut_outs_rects, |
| 133 bool is_visible) { | 133 bool is_visible) { |
| 134 plugin_rect_ = window_rect; | 134 plugin_rect_ = window_rect; |
| 135 if (!instance_->IsFullscreenOrPending()) | 135 if (!instance_->FlashIsFullscreenOrPending()) |
| 136 instance_->ViewChanged(plugin_rect_, clip_rect); | 136 instance_->ViewChanged(plugin_rect_, clip_rect); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void WebPluginImpl::updateFocus(bool focused) { | 139 void WebPluginImpl::updateFocus(bool focused) { |
| 140 instance_->SetWebKitFocus(focused); | 140 instance_->SetWebKitFocus(focused); |
| 141 } | 141 } |
| 142 | 142 |
| 143 void WebPluginImpl::updateVisibility(bool visible) { | 143 void WebPluginImpl::updateVisibility(bool visible) { |
| 144 } | 144 } |
| 145 | 145 |
| 146 bool WebPluginImpl::acceptsInputEvents() { | 146 bool WebPluginImpl::acceptsInputEvents() { |
| 147 return true; | 147 return true; |
| 148 } | 148 } |
| 149 | 149 |
| 150 bool WebPluginImpl::handleInputEvent(const WebKit::WebInputEvent& event, | 150 bool WebPluginImpl::handleInputEvent(const WebKit::WebInputEvent& event, |
| 151 WebKit::WebCursorInfo& cursor_info) { | 151 WebKit::WebCursorInfo& cursor_info) { |
| 152 if (instance_->IsFullscreenOrPending()) | 152 if (instance_->FlashIsFullscreenOrPending()) |
| 153 return false; | 153 return false; |
| 154 return instance_->HandleInputEvent(event, &cursor_info); | 154 return instance_->HandleInputEvent(event, &cursor_info); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void WebPluginImpl::didReceiveResponse( | 157 void WebPluginImpl::didReceiveResponse( |
| 158 const WebKit::WebURLResponse& response) { | 158 const WebKit::WebURLResponse& response) { |
| 159 DCHECK(!document_loader_); | 159 DCHECK(!document_loader_); |
| 160 | 160 |
| 161 if (instance_->module()->is_crashed()) { | 161 if (instance_->module()->is_crashed()) { |
| 162 // Don't create a resource for a crashed plugin. | 162 // Don't create a resource for a crashed plugin. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 WebKit::WebCanvas* canvas) { | 247 WebKit::WebCanvas* canvas) { |
| 248 return instance_->PrintPage(page_number, canvas); | 248 return instance_->PrintPage(page_number, canvas); |
| 249 } | 249 } |
| 250 | 250 |
| 251 void WebPluginImpl::printEnd() { | 251 void WebPluginImpl::printEnd() { |
| 252 return instance_->PrintEnd(); | 252 return instance_->PrintEnd(); |
| 253 } | 253 } |
| 254 | 254 |
| 255 } // namespace ppapi | 255 } // namespace ppapi |
| 256 } // namespace webkit | 256 } // namespace webkit |
| OLD | NEW |