Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 256403004: Move Mojo channel initialization closer to IPC::Channel setup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another ios fix Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 28 matching lines...) Expand all
39 #include "content/browser/renderer_host/media/audio_renderer_host.h" 39 #include "content/browser/renderer_host/media/audio_renderer_host.h"
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/drag_messages.h" 45 #include "content/common/drag_messages.h"
46 #include "content/common/frame_messages.h" 46 #include "content/common/frame_messages.h"
47 #include "content/common/input_messages.h" 47 #include "content/common/input_messages.h"
48 #include "content/common/inter_process_time_ticks_converter.h" 48 #include "content/common/inter_process_time_ticks_converter.h"
49 #include "content/common/mojo/mojo_service_names.h"
49 #include "content/common/speech_recognition_messages.h" 50 #include "content/common/speech_recognition_messages.h"
50 #include "content/common/swapped_out_messages.h" 51 #include "content/common/swapped_out_messages.h"
51 #include "content/common/view_messages.h" 52 #include "content/common/view_messages.h"
53 #include "content/common/web_ui_setup.mojom.h"
52 #include "content/port/browser/render_view_host_delegate_view.h" 54 #include "content/port/browser/render_view_host_delegate_view.h"
53 #include "content/port/browser/render_widget_host_view_port.h" 55 #include "content/port/browser/render_widget_host_view_port.h"
54 #include "content/public/browser/ax_event_notification_details.h" 56 #include "content/public/browser/ax_event_notification_details.h"
55 #include "content/public/browser/browser_accessibility_state.h" 57 #include "content/public/browser/browser_accessibility_state.h"
56 #include "content/public/browser/browser_context.h" 58 #include "content/public/browser/browser_context.h"
57 #include "content/public/browser/browser_message_filter.h" 59 #include "content/public/browser/browser_message_filter.h"
58 #include "content/public/browser/content_browser_client.h" 60 #include "content/public/browser/content_browser_client.h"
59 #include "content/public/browser/native_web_keyboard_event.h" 61 #include "content/public/browser/native_web_keyboard_event.h"
60 #include "content/public/browser/notification_details.h" 62 #include "content/public/browser/notification_details.h"
61 #include "content/public/browser/notification_service.h" 63 #include "content/public/browser/notification_service.h"
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 NOTREACHED() << "Never grant bindings to a guest process."; 689 NOTREACHED() << "Never grant bindings to a guest process.";
688 return; 690 return;
689 } 691 }
690 692
691 if ((enabled_bindings_ & BINDINGS_POLICY_WEB_UI) == 0) { 693 if ((enabled_bindings_ & BINDINGS_POLICY_WEB_UI) == 0) {
692 NOTREACHED() << "You must grant bindings before setting the handle"; 694 NOTREACHED() << "You must grant bindings before setting the handle";
693 return; 695 return;
694 } 696 }
695 697
696 DCHECK(renderer_initialized_); 698 DCHECK(renderer_initialized_);
697 RenderProcessHostImpl* process = 699
698 static_cast<RenderProcessHostImpl*>(GetProcess()); 700 mojo::InterfacePipe<WebUISetup, mojo::AnyInterface> pipe;
699 process->SetWebUIHandle(GetRoutingID(), handle.Pass()); 701 mojo::RemotePtr<WebUISetup> web_ui_setup(pipe.handle_to_self.Pass(), NULL);
702 web_ui_setup->SetWebUIHandle(GetRoutingID(), handle.Pass());
703
704 static_cast<RenderProcessHostImpl*>(GetProcess())->ConnectTo(
705 kRendererService_WebUISetup, pipe.handle_to_peer.Pass());
700 } 706 }
701 707
702 #if defined(OS_ANDROID) 708 #if defined(OS_ANDROID)
703 void RenderViewHostImpl::ActivateNearestFindResult(int request_id, 709 void RenderViewHostImpl::ActivateNearestFindResult(int request_id,
704 float x, 710 float x,
705 float y) { 711 float y) {
706 Send(new InputMsg_ActivateNearestFindResult(GetRoutingID(), 712 Send(new InputMsg_ActivateNearestFindResult(GetRoutingID(),
707 request_id, x, y)); 713 request_id, x, y));
708 } 714 }
709 715
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1755 return true; 1761 return true;
1756 } 1762 }
1757 1763
1758 void RenderViewHostImpl::AttachToFrameTree() { 1764 void RenderViewHostImpl::AttachToFrameTree() {
1759 FrameTree* frame_tree = delegate_->GetFrameTree(); 1765 FrameTree* frame_tree = delegate_->GetFrameTree();
1760 1766
1761 frame_tree->ResetForMainFrameSwap(); 1767 frame_tree->ResetForMainFrameSwap();
1762 } 1768 }
1763 1769
1764 } // namespace content 1770 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_mojo_impl.cc ('k') | content/child/child_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698