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