OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "content/browser/renderer_host/render_process_host_impl.h" | 40 #include "content/browser/renderer_host/render_process_host_impl.h" |
41 #include "content/browser/renderer_host/render_view_host_delegate.h" | 41 #include "content/browser/renderer_host/render_view_host_delegate.h" |
42 #include "content/common/accessibility_messages.h" | 42 #include "content/common/accessibility_messages.h" |
43 #include "content/common/browser_plugin/browser_plugin_messages.h" | 43 #include "content/common/browser_plugin/browser_plugin_messages.h" |
44 #include "content/common/content_switches_internal.h" | 44 #include "content/common/content_switches_internal.h" |
45 #include "content/common/desktop_notification_messages.h" | 45 #include "content/common/desktop_notification_messages.h" |
46 #include "content/common/drag_messages.h" | 46 #include "content/common/drag_messages.h" |
47 #include "content/common/frame_messages.h" | 47 #include "content/common/frame_messages.h" |
48 #include "content/common/input_messages.h" | 48 #include "content/common/input_messages.h" |
49 #include "content/common/inter_process_time_ticks_converter.h" | 49 #include "content/common/inter_process_time_ticks_converter.h" |
| 50 #include "content/common/mojo/mojo_service_names.h" |
50 #include "content/common/speech_recognition_messages.h" | 51 #include "content/common/speech_recognition_messages.h" |
51 #include "content/common/swapped_out_messages.h" | 52 #include "content/common/swapped_out_messages.h" |
52 #include "content/common/view_messages.h" | 53 #include "content/common/view_messages.h" |
| 54 #include "content/common/web_ui_setup.mojom.h" |
53 #include "content/port/browser/render_view_host_delegate_view.h" | 55 #include "content/port/browser/render_view_host_delegate_view.h" |
54 #include "content/port/browser/render_widget_host_view_port.h" | 56 #include "content/port/browser/render_widget_host_view_port.h" |
55 #include "content/public/browser/ax_event_notification_details.h" | 57 #include "content/public/browser/ax_event_notification_details.h" |
56 #include "content/public/browser/browser_accessibility_state.h" | 58 #include "content/public/browser/browser_accessibility_state.h" |
57 #include "content/public/browser/browser_context.h" | 59 #include "content/public/browser/browser_context.h" |
58 #include "content/public/browser/browser_message_filter.h" | 60 #include "content/public/browser/browser_message_filter.h" |
59 #include "content/public/browser/content_browser_client.h" | 61 #include "content/public/browser/content_browser_client.h" |
60 #include "content/public/browser/native_web_keyboard_event.h" | 62 #include "content/public/browser/native_web_keyboard_event.h" |
61 #include "content/public/browser/notification_details.h" | 63 #include "content/public/browser/notification_details.h" |
62 #include "content/public/browser/notification_service.h" | 64 #include "content/public/browser/notification_service.h" |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 NOTREACHED() << "Never grant bindings to a guest process."; | 692 NOTREACHED() << "Never grant bindings to a guest process."; |
691 return; | 693 return; |
692 } | 694 } |
693 | 695 |
694 if ((enabled_bindings_ & BINDINGS_POLICY_WEB_UI) == 0) { | 696 if ((enabled_bindings_ & BINDINGS_POLICY_WEB_UI) == 0) { |
695 NOTREACHED() << "You must grant bindings before setting the handle"; | 697 NOTREACHED() << "You must grant bindings before setting the handle"; |
696 return; | 698 return; |
697 } | 699 } |
698 | 700 |
699 DCHECK(renderer_initialized_); | 701 DCHECK(renderer_initialized_); |
700 RenderProcessHostImpl* process = | 702 |
701 static_cast<RenderProcessHostImpl*>(GetProcess()); | 703 mojo::InterfacePipe<WebUISetup, mojo::AnyInterface> pipe; |
702 process->SetWebUIHandle(GetRoutingID(), handle.Pass()); | 704 mojo::RemotePtr<WebUISetup> web_ui_setup(pipe.handle_to_self.Pass(), NULL); |
| 705 web_ui_setup->SetWebUIHandle(GetRoutingID(), handle.Pass()); |
| 706 |
| 707 static_cast<RenderProcessHostImpl*>(GetProcess())->ConnectTo( |
| 708 kRendererService_WebUISetup, pipe.handle_to_peer.Pass()); |
703 } | 709 } |
704 | 710 |
705 #if defined(OS_ANDROID) | 711 #if defined(OS_ANDROID) |
706 void RenderViewHostImpl::ActivateNearestFindResult(int request_id, | 712 void RenderViewHostImpl::ActivateNearestFindResult(int request_id, |
707 float x, | 713 float x, |
708 float y) { | 714 float y) { |
709 Send(new InputMsg_ActivateNearestFindResult(GetRoutingID(), | 715 Send(new InputMsg_ActivateNearestFindResult(GetRoutingID(), |
710 request_id, x, y)); | 716 request_id, x, y)); |
711 } | 717 } |
712 | 718 |
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1778 return true; | 1784 return true; |
1779 } | 1785 } |
1780 | 1786 |
1781 void RenderViewHostImpl::AttachToFrameTree() { | 1787 void RenderViewHostImpl::AttachToFrameTree() { |
1782 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1788 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1783 | 1789 |
1784 frame_tree->ResetForMainFrameSwap(); | 1790 frame_tree->ResetForMainFrameSwap(); |
1785 } | 1791 } |
1786 | 1792 |
1787 } // namespace content | 1793 } // namespace content |
OLD | NEW |