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