OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/plugins/renderer/webview_plugin.h" | 5 #include "components/plugins/renderer/webview_plugin.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "base/numerics/safe_conversions.h" | 9 #include "base/numerics/safe_conversions.h" |
10 #include "content/public/common/web_preferences.h" | 10 #include "content/public/common/web_preferences.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 const WebRect& unobscured_rect, | 168 const WebRect& unobscured_rect, |
169 const WebVector<WebRect>& cut_outs_rects, | 169 const WebVector<WebRect>& cut_outs_rects, |
170 bool is_visible) { | 170 bool is_visible) { |
171 if (static_cast<gfx::Rect>(window_rect) != rect_) { | 171 if (static_cast<gfx::Rect>(window_rect) != rect_) { |
172 rect_ = window_rect; | 172 rect_ = window_rect; |
173 WebSize newSize(window_rect.width, window_rect.height); | 173 WebSize newSize(window_rect.width, window_rect.height); |
174 web_view_->resize(newSize); | 174 web_view_->resize(newSize); |
175 } | 175 } |
176 | 176 |
177 if (delegate_) | 177 if (delegate_) |
178 delegate_->OnUnobscuredSizeUpdate(gfx::Rect(unobscured_rect).size()); | 178 delegate_->OnUnobscuredRectUpdate(gfx::Rect(unobscured_rect)); |
179 } | 179 } |
180 | 180 |
181 void WebViewPlugin::updateFocus(bool focused, blink::WebFocusType focus_type) { | 181 void WebViewPlugin::updateFocus(bool focused, blink::WebFocusType focus_type) { |
182 focused_ = focused; | 182 focused_ = focused; |
183 } | 183 } |
184 | 184 |
185 bool WebViewPlugin::acceptsInputEvents() { return true; } | 185 bool WebViewPlugin::acceptsInputEvents() { return true; } |
186 | 186 |
187 bool WebViewPlugin::handleInputEvent(const WebInputEvent& event, | 187 bool WebViewPlugin::handleInputEvent(const WebInputEvent& event, |
188 WebCursorInfo& cursor) { | 188 WebCursorInfo& cursor) { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 | 279 |
280 global->Set(gin::StringToV8(isolate, "plugin"), | 280 global->Set(gin::StringToV8(isolate, "plugin"), |
281 delegate_->GetV8Handle(isolate)); | 281 delegate_->GetV8Handle(isolate)); |
282 } | 282 } |
283 | 283 |
284 void WebViewPlugin::didReceiveResponse(WebLocalFrame* frame, | 284 void WebViewPlugin::didReceiveResponse(WebLocalFrame* frame, |
285 unsigned identifier, | 285 unsigned identifier, |
286 const WebURLResponse& response) { | 286 const WebURLResponse& response) { |
287 WebFrameClient::didReceiveResponse(frame, identifier, response); | 287 WebFrameClient::didReceiveResponse(frame, identifier, response); |
288 } | 288 } |
OLD | NEW |