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 if (!instance_->IsFullscreenOrPending() && |
122 !instance_->IsFullscreenOrPending_Dev()) | |
122 instance_->Paint(canvas, plugin_rect_, rect); | 123 instance_->Paint(canvas, plugin_rect_, rect); |
piman
2011/09/09 01:33:44
Maybe I'm confused about the implementation, but s
jeremya
2011/09/09 17:45:35
I think you're right -- in the old fullscreen mode
polina
2011/09/26 21:57:00
I did not have the full background on the differen
| |
123 } | 124 } |
124 | 125 |
125 void WebPluginImpl::updateGeometry( | 126 void WebPluginImpl::updateGeometry( |
126 const WebRect& window_rect, | 127 const WebRect& window_rect, |
127 const WebRect& clip_rect, | 128 const WebRect& clip_rect, |
128 const WebVector<WebRect>& cut_outs_rects, | 129 const WebVector<WebRect>& cut_outs_rects, |
129 bool is_visible) { | 130 bool is_visible) { |
130 plugin_rect_ = window_rect; | 131 plugin_rect_ = window_rect; |
131 if (!instance_->IsFullscreenOrPending()) | 132 if (!instance_->IsFullscreenOrPending() && |
133 !instance_->IsFullscreenOrPending_Dev()) | |
132 instance_->ViewChanged(plugin_rect_, clip_rect); | 134 instance_->ViewChanged(plugin_rect_, clip_rect); |
133 } | 135 } |
134 | 136 |
135 void WebPluginImpl::updateFocus(bool focused) { | 137 void WebPluginImpl::updateFocus(bool focused) { |
136 instance_->SetWebKitFocus(focused); | 138 instance_->SetWebKitFocus(focused); |
137 } | 139 } |
138 | 140 |
139 void WebPluginImpl::updateVisibility(bool visible) { | 141 void WebPluginImpl::updateVisibility(bool visible) { |
140 } | 142 } |
141 | 143 |
142 bool WebPluginImpl::acceptsInputEvents() { | 144 bool WebPluginImpl::acceptsInputEvents() { |
143 return true; | 145 return true; |
144 } | 146 } |
145 | 147 |
146 bool WebPluginImpl::handleInputEvent(const WebKit::WebInputEvent& event, | 148 bool WebPluginImpl::handleInputEvent(const WebKit::WebInputEvent& event, |
147 WebKit::WebCursorInfo& cursor_info) { | 149 WebKit::WebCursorInfo& cursor_info) { |
148 if (instance_->IsFullscreenOrPending()) | 150 if (instance_->IsFullscreenOrPending() || |
151 instance_->IsFullscreenOrPending_Dev()) | |
149 return false; | 152 return false; |
150 return instance_->HandleInputEvent(event, &cursor_info); | 153 return instance_->HandleInputEvent(event, &cursor_info); |
151 } | 154 } |
152 | 155 |
153 void WebPluginImpl::didReceiveResponse( | 156 void WebPluginImpl::didReceiveResponse( |
154 const WebKit::WebURLResponse& response) { | 157 const WebKit::WebURLResponse& response) { |
155 DCHECK(!document_loader_); | 158 DCHECK(!document_loader_); |
156 | 159 |
157 document_loader_ = new PPB_URLLoader_Impl(instance_->pp_instance(), true); | 160 document_loader_ = new PPB_URLLoader_Impl(instance_->pp_instance(), true); |
158 document_loader_->didReceiveResponse(NULL, response); | 161 document_loader_->didReceiveResponse(NULL, response); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
237 WebKit::WebCanvas* canvas) { | 240 WebKit::WebCanvas* canvas) { |
238 return instance_->PrintPage(page_number, canvas); | 241 return instance_->PrintPage(page_number, canvas); |
239 } | 242 } |
240 | 243 |
241 void WebPluginImpl::printEnd() { | 244 void WebPluginImpl::printEnd() { |
242 return instance_->PrintEnd(); | 245 return instance_->PrintEnd(); |
243 } | 246 } |
244 | 247 |
245 } // namespace ppapi | 248 } // namespace ppapi |
246 } // namespace webkit | 249 } // namespace webkit |
OLD | NEW |