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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 if (!callback.is_null()) { | 415 if (!callback.is_null()) { |
416 request_reply = true; | 416 request_reply = true; |
417 key = g_next_javascript_callback_id++; | 417 key = g_next_javascript_callback_id++; |
418 javascript_callbacks_.insert(std::make_pair(key, callback)); | 418 javascript_callbacks_.insert(std::make_pair(key, callback)); |
419 } | 419 } |
420 | 420 |
421 Send(new FrameMsg_JavaScriptExecuteRequestInIsolatedWorld( | 421 Send(new FrameMsg_JavaScriptExecuteRequestInIsolatedWorld( |
422 routing_id_, javascript, key, request_reply, world_id)); | 422 routing_id_, javascript, key, request_reply, world_id)); |
423 } | 423 } |
424 | 424 |
| 425 void RenderFrameHostImpl::CopyImageAt(int x, int y) { |
| 426 Send(new FrameMsg_CopyImageAt(routing_id_, x, y)); |
| 427 } |
| 428 |
| 429 void RenderFrameHostImpl::SaveImageAt(int x, int y) { |
| 430 Send(new FrameMsg_SaveImageAt(routing_id_, x, y)); |
| 431 } |
| 432 |
425 RenderViewHost* RenderFrameHostImpl::GetRenderViewHost() { | 433 RenderViewHost* RenderFrameHostImpl::GetRenderViewHost() { |
426 return render_view_host_; | 434 return render_view_host_; |
427 } | 435 } |
428 | 436 |
429 ServiceRegistry* RenderFrameHostImpl::GetServiceRegistry() { | 437 ServiceRegistry* RenderFrameHostImpl::GetServiceRegistry() { |
430 return service_registry_.get(); | 438 return service_registry_.get(); |
431 } | 439 } |
432 | 440 |
433 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() { | 441 blink::WebPageVisibilityState RenderFrameHostImpl::GetVisibilityState() { |
434 // Works around the crashes seen in https://crbug.com/501863, where the | 442 // Works around the crashes seen in https://crbug.com/501863, where the |
(...skipping 2329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2764 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2772 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
2765 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2773 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
2766 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2774 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
2767 } | 2775 } |
2768 | 2776 |
2769 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2777 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
2770 web_bluetooth_service_.reset(); | 2778 web_bluetooth_service_.reset(); |
2771 } | 2779 } |
2772 | 2780 |
2773 } // namespace content | 2781 } // namespace content |
OLD | NEW |