| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 } | 1172 } |
| 1173 | 1173 |
| 1174 blink::WebView* RenderViewImpl::webview() const { | 1174 blink::WebView* RenderViewImpl::webview() const { |
| 1175 return static_cast<blink::WebView*>(webwidget()); | 1175 return static_cast<blink::WebView*>(webwidget()); |
| 1176 } | 1176 } |
| 1177 | 1177 |
| 1178 #if defined(ENABLE_PLUGINS) | 1178 #if defined(ENABLE_PLUGINS) |
| 1179 void RenderViewImpl::PepperInstanceCreated( | 1179 void RenderViewImpl::PepperInstanceCreated( |
| 1180 PepperPluginInstanceImpl* instance) { | 1180 PepperPluginInstanceImpl* instance) { |
| 1181 active_pepper_instances_.insert(instance); | 1181 active_pepper_instances_.insert(instance); |
| 1182 |
| 1183 RenderFrameImpl* const render_frame = instance->render_frame(); |
| 1184 render_frame->Send( |
| 1185 new FrameHostMsg_PepperInstanceCreated(render_frame->GetRoutingID())); |
| 1182 } | 1186 } |
| 1183 | 1187 |
| 1184 void RenderViewImpl::PepperInstanceDeleted( | 1188 void RenderViewImpl::PepperInstanceDeleted( |
| 1185 PepperPluginInstanceImpl* instance) { | 1189 PepperPluginInstanceImpl* instance) { |
| 1186 active_pepper_instances_.erase(instance); | 1190 active_pepper_instances_.erase(instance); |
| 1187 | 1191 |
| 1188 if (pepper_last_mouse_event_target_ == instance) | 1192 if (pepper_last_mouse_event_target_ == instance) |
| 1189 pepper_last_mouse_event_target_ = NULL; | 1193 pepper_last_mouse_event_target_ = NULL; |
| 1190 if (focused_pepper_plugin_ == instance) | 1194 if (focused_pepper_plugin_ == instance) |
| 1191 PepperFocusChanged(instance, false); | 1195 PepperFocusChanged(instance, false); |
| 1196 |
| 1197 RenderFrameImpl* const render_frame = instance->render_frame(); |
| 1198 if (render_frame) |
| 1199 render_frame->Send( |
| 1200 new FrameHostMsg_PepperInstanceDeleted(render_frame->GetRoutingID())); |
| 1192 } | 1201 } |
| 1193 | 1202 |
| 1194 void RenderViewImpl::PepperFocusChanged(PepperPluginInstanceImpl* instance, | 1203 void RenderViewImpl::PepperFocusChanged(PepperPluginInstanceImpl* instance, |
| 1195 bool focused) { | 1204 bool focused) { |
| 1196 if (focused) | 1205 if (focused) |
| 1197 focused_pepper_plugin_ = instance; | 1206 focused_pepper_plugin_ = instance; |
| 1198 else if (focused_pepper_plugin_ == instance) | 1207 else if (focused_pepper_plugin_ == instance) |
| 1199 focused_pepper_plugin_ = NULL; | 1208 focused_pepper_plugin_ = NULL; |
| 1200 | 1209 |
| 1201 UpdateTextInputType(); | 1210 UpdateTextInputType(); |
| (...skipping 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3769 std::vector<gfx::Size> sizes; | 3778 std::vector<gfx::Size> sizes; |
| 3770 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 3779 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 3771 if (!url.isEmpty()) | 3780 if (!url.isEmpty()) |
| 3772 urls.push_back( | 3781 urls.push_back( |
| 3773 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 3782 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 3774 } | 3783 } |
| 3775 SendUpdateFaviconURL(urls); | 3784 SendUpdateFaviconURL(urls); |
| 3776 } | 3785 } |
| 3777 | 3786 |
| 3778 } // namespace content | 3787 } // namespace content |
| OLD | NEW |