OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser_plugin/browser_plugin.h" | 5 #include "content/renderer/browser_plugin/browser_plugin.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 g_plugin_container_map.Get().erase(container_); | 318 g_plugin_container_map.Get().erase(container_); |
319 } | 319 } |
320 | 320 |
321 container_ = nullptr; | 321 container_ = nullptr; |
322 // Will be a no-op if the mouse is not currently locked. | 322 // Will be a no-op if the mouse is not currently locked. |
323 auto render_frame = RenderFrameImpl::FromRoutingID(render_frame_routing_id()); | 323 auto render_frame = RenderFrameImpl::FromRoutingID(render_frame_routing_id()); |
324 auto render_view = static_cast<RenderViewImpl*>( | 324 auto render_view = static_cast<RenderViewImpl*>( |
325 render_frame ? render_frame->GetRenderView() : nullptr); | 325 render_frame ? render_frame->GetRenderView() : nullptr); |
326 if (render_view) | 326 if (render_view) |
327 render_view->mouse_lock_dispatcher()->OnLockTargetDestroyed(this); | 327 render_view->mouse_lock_dispatcher()->OnLockTargetDestroyed(this); |
328 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 328 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); |
329 } | 329 } |
330 | 330 |
331 v8::Local<v8::Object> BrowserPlugin::v8ScriptableObject(v8::Isolate* isolate) { | 331 v8::Local<v8::Object> BrowserPlugin::v8ScriptableObject(v8::Isolate* isolate) { |
332 if (!delegate_) | 332 if (!delegate_) |
333 return v8::Local<v8::Object>(); | 333 return v8::Local<v8::Object>(); |
334 | 334 |
335 return delegate_->V8ScriptableObject(isolate); | 335 return delegate_->V8ScriptableObject(isolate); |
336 } | 336 } |
337 | 337 |
338 bool BrowserPlugin::supportsKeyboardFocus() const { | 338 bool BrowserPlugin::supportsKeyboardFocus() const { |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 | 569 |
570 bool BrowserPlugin::HandleMouseLockedInputEvent( | 570 bool BrowserPlugin::HandleMouseLockedInputEvent( |
571 const blink::WebMouseEvent& event) { | 571 const blink::WebMouseEvent& event) { |
572 BrowserPluginManager::Get()->Send( | 572 BrowserPluginManager::Get()->Send( |
573 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, | 573 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, |
574 &event)); | 574 &event)); |
575 return true; | 575 return true; |
576 } | 576 } |
577 | 577 |
578 } // namespace content | 578 } // namespace content |
OLD | NEW |