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

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

Issue 1778443002: Use instance name to uniquify renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@40fix2
Patch Set: Created 4 years, 9 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
OLDNEW
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 20 matching lines...) Expand all
31 DCHECK(parent_window); 31 DCHECK(parent_window);
32 mus::Window* window = parent_window->connection()->NewWindow(); 32 mus::Window* window = parent_window->connection()->NewWindow();
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 mojo::Identity identity = GetMojoIdentity(host_->GetProcess());
42 mojom::RenderWidgetWindowTreeClientFactoryPtr factory; 42 mojom::RenderWidgetWindowTreeClientFactoryPtr factory;
43 MojoShellConnection::Get()->GetConnector()->ConnectToInterface(url, &factory); 43 MojoShellConnection::Get()->GetConnector()->ConnectToInterface(
44 identity, &factory);
44 45
45 mus::mojom::WindowTreeClientPtr window_tree_client; 46 mus::mojom::WindowTreeClientPtr window_tree_client;
46 factory->CreateWindowTreeClientForRenderWidget( 47 factory->CreateWindowTreeClientForRenderWidget(
47 host_->GetRoutingID(), mojo::GetProxy(&window_tree_client)); 48 host_->GetRoutingID(), mojo::GetProxy(&window_tree_client));
48 mus_window_->window()->Embed(std::move(window_tree_client)); 49 mus_window_->window()->Embed(std::move(window_tree_client));
49 } 50 }
50 51
51 RenderWidgetHostViewMus::~RenderWidgetHostViewMus() {} 52 RenderWidgetHostViewMus::~RenderWidgetHostViewMus() {}
52 53
53 void RenderWidgetHostViewMus::InternalSetBounds(const gfx::Rect& rect) { 54 void RenderWidgetHostViewMus::InternalSetBounds(const gfx::Rect& rect) {
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 void RenderWidgetHostViewMus::SetParentNativeViewAccessible( 326 void RenderWidgetHostViewMus::SetParentNativeViewAccessible(
326 gfx::NativeViewAccessible accessible_parent) {} 327 gfx::NativeViewAccessible accessible_parent) {}
327 328
328 gfx::NativeViewId RenderWidgetHostViewMus::GetParentForWindowlessPlugin() 329 gfx::NativeViewId RenderWidgetHostViewMus::GetParentForWindowlessPlugin()
329 const { 330 const {
330 return gfx::NativeViewId(); 331 return gfx::NativeViewId();
331 } 332 }
332 #endif 333 #endif
333 334
334 } // namespace content 335 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698