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/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 if (!callback.is_null()) { | 442 if (!callback.is_null()) { |
443 request_reply = true; | 443 request_reply = true; |
444 key = g_next_javascript_callback_id++; | 444 key = g_next_javascript_callback_id++; |
445 javascript_callbacks_.insert(std::make_pair(key, callback)); | 445 javascript_callbacks_.insert(std::make_pair(key, callback)); |
446 } | 446 } |
447 | 447 |
448 Send(new FrameMsg_JavaScriptExecuteRequestInIsolatedWorld( | 448 Send(new FrameMsg_JavaScriptExecuteRequestInIsolatedWorld( |
449 routing_id_, javascript, key, request_reply, world_id)); | 449 routing_id_, javascript, key, request_reply, world_id)); |
450 } | 450 } |
451 | 451 |
| 452 void RenderFrameHostImpl::CopyImageAt(int x, int y) { |
| 453 Send(new FrameMsg_CopyImageAt(routing_id_, x, y)); |
| 454 } |
| 455 |
| 456 void RenderFrameHostImpl::SaveImageAt(int x, int y) { |
| 457 Send(new FrameMsg_SaveImageAt(routing_id_, x, y)); |
| 458 } |
| 459 |
452 RenderViewHost* RenderFrameHostImpl::GetRenderViewHost() { | 460 RenderViewHost* RenderFrameHostImpl::GetRenderViewHost() { |
453 return render_view_host_; | 461 return render_view_host_; |
454 } | 462 } |
455 | 463 |
456 ServiceRegistry* RenderFrameHostImpl::GetServiceRegistry() { | 464 ServiceRegistry* RenderFrameHostImpl::GetServiceRegistry() { |
457 return service_registry_.get(); | 465 return service_registry_.get(); |
458 } | 466 } |
459 | 467 |
460 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() { | 468 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() { |
461 // Works around the crashes seen in https://crbug.com/501863, where the | 469 // Works around the crashes seen in https://crbug.com/501863, where the |
(...skipping 2444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2906 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2914 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
2907 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2915 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
2908 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2916 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
2909 } | 2917 } |
2910 | 2918 |
2911 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2919 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
2912 web_bluetooth_service_.reset(); | 2920 web_bluetooth_service_.reset(); |
2913 } | 2921 } |
2914 | 2922 |
2915 } // namespace content | 2923 } // namespace content |
OLD | NEW |