| 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" |
| 11 #include "components/mus/public/cpp/window_tree_connection.h" | 11 #include "components/mus/public/cpp/window_tree_client.h" |
| 12 #include "content/browser/renderer_host/render_process_host_impl.h" | 12 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 13 #include "content/browser/renderer_host/render_widget_host_impl.h" | 13 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 14 #include "content/common/render_widget_window_tree_client_factory.mojom.h" | 14 #include "content/common/render_widget_window_tree_client_factory.mojom.h" |
| 15 #include "content/common/text_input_state.h" | 15 #include "content/common/text_input_state.h" |
| 16 #include "content/public/common/mojo_shell_connection.h" | 16 #include "content/public/common/mojo_shell_connection.h" |
| 17 #include "services/shell/public/cpp/connector.h" | 17 #include "services/shell/public/cpp/connector.h" |
| 18 #include "ui/aura/client/screen_position_client.h" | 18 #include "ui/aura/client/screen_position_client.h" |
| 19 #include "ui/aura/window.h" | 19 #include "ui/aura/window.h" |
| 20 #include "ui/base/hit_test.h" | 20 #include "ui/base/hit_test.h" |
| 21 | 21 |
| 22 namespace blink { | 22 namespace blink { |
| 23 struct WebScreenInfo; | 23 struct WebScreenInfo; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 | 27 |
| 28 RenderWidgetHostViewMus::RenderWidgetHostViewMus(mus::Window* parent_window, | 28 RenderWidgetHostViewMus::RenderWidgetHostViewMus(mus::Window* parent_window, |
| 29 RenderWidgetHostImpl* host) | 29 RenderWidgetHostImpl* host) |
| 30 : host_(host), aura_window_(nullptr) { | 30 : host_(host), aura_window_(nullptr) { |
| 31 DCHECK(parent_window); | 31 DCHECK(parent_window); |
| 32 mus::Window* window = parent_window->connection()->NewWindow(); | 32 mus::Window* window = parent_window->window_tree()->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 mojom::RenderWidgetWindowTreeClientFactoryPtr factory; | 41 mojom::RenderWidgetWindowTreeClientFactoryPtr factory; |
| 42 host_->GetProcess()->GetChildConnection()->GetInterface(&factory); | 42 host_->GetProcess()->GetChildConnection()->GetInterface(&factory); |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 void RenderWidgetHostViewMus::LockCompositingSurface() { | 299 void RenderWidgetHostViewMus::LockCompositingSurface() { |
| 300 NOTIMPLEMENTED(); | 300 NOTIMPLEMENTED(); |
| 301 } | 301 } |
| 302 | 302 |
| 303 void RenderWidgetHostViewMus::UnlockCompositingSurface() { | 303 void RenderWidgetHostViewMus::UnlockCompositingSurface() { |
| 304 NOTIMPLEMENTED(); | 304 NOTIMPLEMENTED(); |
| 305 } | 305 } |
| 306 | 306 |
| 307 } // namespace content | 307 } // namespace content |
| OLD | NEW |