| 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 6262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6273 } | 6273 } |
| 6274 } | 6274 } |
| 6275 | 6275 |
| 6276 void RenderFrameImpl::PepperFocusChanged(PepperPluginInstanceImpl* instance, | 6276 void RenderFrameImpl::PepperFocusChanged(PepperPluginInstanceImpl* instance, |
| 6277 bool focused) { | 6277 bool focused) { |
| 6278 if (focused) | 6278 if (focused) |
| 6279 focused_pepper_plugin_ = instance; | 6279 focused_pepper_plugin_ = instance; |
| 6280 else if (focused_pepper_plugin_ == instance) | 6280 else if (focused_pepper_plugin_ == instance) |
| 6281 focused_pepper_plugin_ = nullptr; | 6281 focused_pepper_plugin_ = nullptr; |
| 6282 | 6282 |
| 6283 GetRenderWidget()->set_focused_pepper_plugin(focused_pepper_plugin_); |
| 6284 |
| 6283 GetRenderWidget()->UpdateTextInputState(ShowIme::HIDE_IME, | 6285 GetRenderWidget()->UpdateTextInputState(ShowIme::HIDE_IME, |
| 6284 ChangeSource::FROM_NON_IME); | 6286 ChangeSource::FROM_NON_IME); |
| 6285 GetRenderWidget()->UpdateSelectionBounds(); | 6287 GetRenderWidget()->UpdateSelectionBounds(); |
| 6286 } | 6288 } |
| 6287 | 6289 |
| 6288 void RenderFrameImpl::PepperStartsPlayback(PepperPluginInstanceImpl* instance) { | 6290 void RenderFrameImpl::PepperStartsPlayback(PepperPluginInstanceImpl* instance) { |
| 6289 RenderFrameImpl* const render_frame = instance->render_frame(); | 6291 RenderFrameImpl* const render_frame = instance->render_frame(); |
| 6290 if (render_frame) { | 6292 if (render_frame) { |
| 6291 render_frame->Send( | 6293 render_frame->Send( |
| 6292 new FrameHostMsg_PepperStartsPlayback( | 6294 new FrameHostMsg_PepperStartsPlayback( |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6328 // event target. Potentially a Pepper plugin will receive the event. | 6330 // event target. Potentially a Pepper plugin will receive the event. |
| 6329 // In order to tell whether a plugin gets the last mouse event and which it | 6331 // In order to tell whether a plugin gets the last mouse event and which it |
| 6330 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6332 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6331 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6333 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6332 // |pepper_last_mouse_event_target_|. | 6334 // |pepper_last_mouse_event_target_|. |
| 6333 pepper_last_mouse_event_target_ = nullptr; | 6335 pepper_last_mouse_event_target_ = nullptr; |
| 6334 #endif | 6336 #endif |
| 6335 } | 6337 } |
| 6336 | 6338 |
| 6337 } // namespace content | 6339 } // namespace content |
| OLD | NEW |