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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // The object is expected to be retained before it is returned. | 111 // The object is expected to be retained before it is returned. |
112 WebKit::WebBindings::retainObject(message_channel_np_object); | 112 WebKit::WebBindings::retainObject(message_channel_np_object); |
113 return message_channel_np_object; | 113 return message_channel_np_object; |
114 } | 114 } |
115 | 115 |
116 bool WebPluginImpl::getFormValue(WebString* value) { | 116 bool WebPluginImpl::getFormValue(WebString* value) { |
117 return false; | 117 return false; |
118 } | 118 } |
119 | 119 |
120 void WebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) { | 120 void WebPluginImpl::paint(WebCanvas* canvas, const WebRect& rect) { |
121 if (!instance_->IsFullscreenOrPending()) | 121 instance_->Paint(canvas, plugin_rect_, rect); |
122 instance_->Paint(canvas, plugin_rect_, rect); | |
123 } | 122 } |
124 | 123 |
125 void WebPluginImpl::updateGeometry( | 124 void WebPluginImpl::updateGeometry( |
126 const WebRect& window_rect, | 125 const WebRect& window_rect, |
127 const WebRect& clip_rect, | 126 const WebRect& clip_rect, |
128 const WebVector<WebRect>& cut_outs_rects, | 127 const WebVector<WebRect>& cut_outs_rects, |
129 bool is_visible) { | 128 bool is_visible) { |
130 plugin_rect_ = window_rect; | 129 plugin_rect_ = window_rect; |
131 if (!instance_->IsFullscreenOrPending()) | 130 instance_->ViewChanged(plugin_rect_, clip_rect); |
132 instance_->ViewChanged(plugin_rect_, clip_rect); | |
133 } | 131 } |
134 | 132 |
135 void WebPluginImpl::updateFocus(bool focused) { | 133 void WebPluginImpl::updateFocus(bool focused) { |
136 instance_->SetWebKitFocus(focused); | 134 instance_->SetWebKitFocus(focused); |
137 } | 135 } |
138 | 136 |
139 void WebPluginImpl::updateVisibility(bool visible) { | 137 void WebPluginImpl::updateVisibility(bool visible) { |
140 } | 138 } |
141 | 139 |
142 bool WebPluginImpl::acceptsInputEvents() { | 140 bool WebPluginImpl::acceptsInputEvents() { |
143 return true; | 141 return true; |
144 } | 142 } |
145 | 143 |
146 bool WebPluginImpl::handleInputEvent(const WebKit::WebInputEvent& event, | 144 bool WebPluginImpl::handleInputEvent(const WebKit::WebInputEvent& event, |
147 WebKit::WebCursorInfo& cursor_info) { | 145 WebKit::WebCursorInfo& cursor_info) { |
148 if (instance_->IsFullscreenOrPending()) | |
149 return false; | |
150 return instance_->HandleInputEvent(event, &cursor_info); | 146 return instance_->HandleInputEvent(event, &cursor_info); |
151 } | 147 } |
152 | 148 |
153 void WebPluginImpl::didReceiveResponse( | 149 void WebPluginImpl::didReceiveResponse( |
154 const WebKit::WebURLResponse& response) { | 150 const WebKit::WebURLResponse& response) { |
155 DCHECK(!document_loader_); | 151 DCHECK(!document_loader_); |
156 | 152 |
157 document_loader_ = new PPB_URLLoader_Impl(instance_, true); | 153 document_loader_ = new PPB_URLLoader_Impl(instance_, true); |
158 document_loader_->didReceiveResponse(NULL, response); | 154 document_loader_->didReceiveResponse(NULL, response); |
159 | 155 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 WebKit::WebCanvas* canvas) { | 233 WebKit::WebCanvas* canvas) { |
238 return instance_->PrintPage(page_number, canvas); | 234 return instance_->PrintPage(page_number, canvas); |
239 } | 235 } |
240 | 236 |
241 void WebPluginImpl::printEnd() { | 237 void WebPluginImpl::printEnd() { |
242 return instance_->PrintEnd(); | 238 return instance_->PrintEnd(); |
243 } | 239 } |
244 | 240 |
245 } // namespace ppapi | 241 } // namespace ppapi |
246 } // namespace webkit | 242 } // namespace webkit |
OLD | NEW |