OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_widget_host_view_mus.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_mus.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "components/mus/public/cpp/window.h" | 10 #include "components/mus/public/cpp/window.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 window->SetVisible(true); | 33 window->SetVisible(true); |
34 window->SetBounds(gfx::Rect(300, 300)); | 34 window->SetBounds(gfx::Rect(300, 300)); |
35 parent_window->AddChild(window); | 35 parent_window->AddChild(window); |
36 mus_window_.reset(new mus::ScopedWindowPtr(window)); | 36 mus_window_.reset(new mus::ScopedWindowPtr(window)); |
37 host_->SetView(this); | 37 host_->SetView(this); |
38 | 38 |
39 // Connect to the renderer, pass it a WindowTreeClient interface request | 39 // Connect to the renderer, pass it a WindowTreeClient interface request |
40 // and embed that client inside our mus window. | 40 // and embed that client inside our mus window. |
41 std::string url = GetMojoApplicationInstanceURL(host_->GetProcess()); | 41 std::string url = GetMojoApplicationInstanceURL(host_->GetProcess()); |
42 mojom::RenderWidgetWindowTreeClientFactoryPtr factory; | 42 mojom::RenderWidgetWindowTreeClientFactoryPtr factory; |
43 MojoShellConnection::Get()->GetShell()->ConnectToService(url, &factory); | 43 MojoShellConnection::Get()->GetShell()->ConnectToInterface(url, &factory); |
44 | 44 |
45 mus::mojom::WindowTreeClientPtr window_tree_client; | 45 mus::mojom::WindowTreeClientPtr window_tree_client; |
46 factory->CreateWindowTreeClientForRenderWidget( | 46 factory->CreateWindowTreeClientForRenderWidget( |
47 host_->GetRoutingID(), mojo::GetProxy(&window_tree_client)); | 47 host_->GetRoutingID(), mojo::GetProxy(&window_tree_client)); |
48 mus_window_->window()->Embed(std::move(window_tree_client)); | 48 mus_window_->window()->Embed(std::move(window_tree_client)); |
49 } | 49 } |
50 | 50 |
51 RenderWidgetHostViewMus::~RenderWidgetHostViewMus() {} | 51 RenderWidgetHostViewMus::~RenderWidgetHostViewMus() {} |
52 | 52 |
53 void RenderWidgetHostViewMus::InternalSetBounds(const gfx::Rect& rect) { | 53 void RenderWidgetHostViewMus::InternalSetBounds(const gfx::Rect& rect) { |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 void RenderWidgetHostViewMus::SetParentNativeViewAccessible( | 325 void RenderWidgetHostViewMus::SetParentNativeViewAccessible( |
326 gfx::NativeViewAccessible accessible_parent) {} | 326 gfx::NativeViewAccessible accessible_parent) {} |
327 | 327 |
328 gfx::NativeViewId RenderWidgetHostViewMus::GetParentForWindowlessPlugin() | 328 gfx::NativeViewId RenderWidgetHostViewMus::GetParentForWindowlessPlugin() |
329 const { | 329 const { |
330 return gfx::NativeViewId(); | 330 return gfx::NativeViewId(); |
331 } | 331 } |
332 #endif | 332 #endif |
333 | 333 |
334 } // namespace content | 334 } // namespace content |
OLD | NEW |