| 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 "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 RenderWidget* RenderFrameImpl::GetRenderWidget() { | 1259 RenderWidget* RenderFrameImpl::GetRenderWidget() { |
| 1260 RenderFrameImpl* local_root = | 1260 RenderFrameImpl* local_root = |
| 1261 RenderFrameImpl::FromWebFrame(frame_->localRoot()); | 1261 RenderFrameImpl::FromWebFrame(frame_->localRoot()); |
| 1262 return local_root->render_widget_.get(); | 1262 return local_root->render_widget_.get(); |
| 1263 } | 1263 } |
| 1264 | 1264 |
| 1265 #if defined(ENABLE_PLUGINS) | 1265 #if defined(ENABLE_PLUGINS) |
| 1266 void RenderFrameImpl::PepperPluginCreated(RendererPpapiHost* host) { | 1266 void RenderFrameImpl::PepperPluginCreated(RendererPpapiHost* host) { |
| 1267 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, | 1267 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, |
| 1268 DidCreatePepperPlugin(host)); | 1268 DidCreatePepperPlugin(host)); |
| 1269 if (host->GetPluginName() == kFlashPluginName) { | |
| 1270 RenderThread::Get()->RecordAction( | |
| 1271 base::UserMetricsAction("FrameLoadWithFlash")); | |
| 1272 } | |
| 1273 } | 1269 } |
| 1274 | 1270 |
| 1275 void RenderFrameImpl::PepperDidChangeCursor( | 1271 void RenderFrameImpl::PepperDidChangeCursor( |
| 1276 PepperPluginInstanceImpl* instance, | 1272 PepperPluginInstanceImpl* instance, |
| 1277 const blink::WebCursorInfo& cursor) { | 1273 const blink::WebCursorInfo& cursor) { |
| 1278 // Update the cursor appearance immediately if the requesting plugin is the | 1274 // Update the cursor appearance immediately if the requesting plugin is the |
| 1279 // one which receives the last mouse event. Otherwise, the new cursor won't be | 1275 // one which receives the last mouse event. Otherwise, the new cursor won't be |
| 1280 // picked up until the plugin gets the next input event. That is bad if, e.g., | 1276 // picked up until the plugin gets the next input event. That is bad if, e.g., |
| 1281 // the plugin would like to set an invisible cursor when there isn't any user | 1277 // the plugin would like to set an invisible cursor when there isn't any user |
| 1282 // input for a while. | 1278 // input for a while. |
| (...skipping 5047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6330 // event target. Potentially a Pepper plugin will receive the event. | 6326 // event target. Potentially a Pepper plugin will receive the event. |
| 6331 // In order to tell whether a plugin gets the last mouse event and which it | 6327 // In order to tell whether a plugin gets the last mouse event and which it |
| 6332 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6328 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6333 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6329 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6334 // |pepper_last_mouse_event_target_|. | 6330 // |pepper_last_mouse_event_target_|. |
| 6335 pepper_last_mouse_event_target_ = nullptr; | 6331 pepper_last_mouse_event_target_ = nullptr; |
| 6336 #endif | 6332 #endif |
| 6337 } | 6333 } |
| 6338 | 6334 |
| 6339 } // namespace content | 6335 } // namespace content |
| OLD | NEW |