| 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 return; | 679 return; |
| 680 } | 680 } |
| 681 | 681 |
| 682 if ((enabled_bindings_ & BINDINGS_POLICY_WEB_UI) == 0) { | 682 if ((enabled_bindings_ & BINDINGS_POLICY_WEB_UI) == 0) { |
| 683 NOTREACHED() << "You must grant bindings before setting the handle"; | 683 NOTREACHED() << "You must grant bindings before setting the handle"; |
| 684 return; | 684 return; |
| 685 } | 685 } |
| 686 | 686 |
| 687 DCHECK(renderer_initialized_); | 687 DCHECK(renderer_initialized_); |
| 688 | 688 |
| 689 mojo::InterfacePipe<WebUISetup, mojo::AnyInterface> pipe; | 689 WebUISetupPtr web_ui_setup; |
| 690 mojo::RemotePtr<WebUISetup> web_ui_setup(pipe.handle_to_self.Pass(), NULL); | 690 static_cast<RenderProcessHostImpl*>(GetProcess())->ConnectTo( |
| 691 kRendererService_WebUISetup, &web_ui_setup); |
| 692 |
| 691 web_ui_setup->SetWebUIHandle(GetRoutingID(), handle.Pass()); | 693 web_ui_setup->SetWebUIHandle(GetRoutingID(), handle.Pass()); |
| 692 | |
| 693 static_cast<RenderProcessHostImpl*>(GetProcess())->ConnectTo( | |
| 694 kRendererService_WebUISetup, pipe.handle_to_peer.Pass()); | |
| 695 } | 694 } |
| 696 | 695 |
| 697 #if defined(OS_ANDROID) | 696 #if defined(OS_ANDROID) |
| 698 void RenderViewHostImpl::ActivateNearestFindResult(int request_id, | 697 void RenderViewHostImpl::ActivateNearestFindResult(int request_id, |
| 699 float x, | 698 float x, |
| 700 float y) { | 699 float y) { |
| 701 Send(new InputMsg_ActivateNearestFindResult(GetRoutingID(), | 700 Send(new InputMsg_ActivateNearestFindResult(GetRoutingID(), |
| 702 request_id, x, y)); | 701 request_id, x, y)); |
| 703 } | 702 } |
| 704 | 703 |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1721 return true; | 1720 return true; |
| 1722 } | 1721 } |
| 1723 | 1722 |
| 1724 void RenderViewHostImpl::AttachToFrameTree() { | 1723 void RenderViewHostImpl::AttachToFrameTree() { |
| 1725 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1724 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 1726 | 1725 |
| 1727 frame_tree->ResetForMainFrameSwap(); | 1726 frame_tree->ResetForMainFrameSwap(); |
| 1728 } | 1727 } |
| 1729 | 1728 |
| 1730 } // namespace content | 1729 } // namespace content |
| OLD | NEW |