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 "components/mus/public/cpp/window.h" | 7 #include "components/mus/public/cpp/window.h" |
8 #include "components/mus/public/cpp/window_tree_connection.h" | 8 #include "components/mus/public/cpp/window_tree_connection.h" |
9 #include "content/browser/mojo/mojo_shell_client_host.h" | 9 #include "content/browser/mojo/mojo_shell_client_host.h" |
10 #include "content/browser/renderer_host/render_process_host_impl.h" | 10 #include "content/browser/renderer_host/render_process_host_impl.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 void RenderWidgetHostViewMus::Hide() { | 55 void RenderWidgetHostViewMus::Hide() { |
56 host_->WasHidden(); | 56 host_->WasHidden(); |
57 } | 57 } |
58 | 58 |
59 bool RenderWidgetHostViewMus::IsShowing() { | 59 bool RenderWidgetHostViewMus::IsShowing() { |
60 return !host_->is_hidden(); | 60 return !host_->is_hidden(); |
61 } | 61 } |
62 | 62 |
63 void RenderWidgetHostViewMus::SetSize(const gfx::Size& size) { | 63 void RenderWidgetHostViewMus::SetSize(const gfx::Size& size) { |
64 size_ = size; | 64 size_ = size; |
65 window_->window()->SetBounds(gfx::Rect(size)); | 65 gfx::Rect bounds = window_->window()->bounds(); |
66 // TODO(fsamuel): figure out position. | |
Ben Goodger (Google)
2015/12/01 18:44:14
I suspect you'll end up needing to have an aura::W
Peng
2015/12/01 19:41:38
Talked to fsamuel, and he will take care of it.
A
| |
67 bounds.set_x(10); | |
68 bounds.set_y(150); | |
69 bounds.set_size(size); | |
70 window_->window()->SetBounds(bounds); | |
66 host_->WasResized(); | 71 host_->WasResized(); |
67 } | 72 } |
68 | 73 |
69 void RenderWidgetHostViewMus::SetBounds(const gfx::Rect& rect) { | 74 void RenderWidgetHostViewMus::SetBounds(const gfx::Rect& rect) { |
70 SetSize(rect.size()); | 75 SetSize(rect.size()); |
71 } | 76 } |
72 | 77 |
73 void RenderWidgetHostViewMus::Focus() { | 78 void RenderWidgetHostViewMus::Focus() { |
74 // TODO(fsamuel): Request focus for the associated Mus::Window | 79 // TODO(fsamuel): Request focus for the associated Mus::Window |
75 // We need to be careful how we propagate focus as we navigate to and | 80 // We need to be careful how we propagate focus as we navigate to and |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
296 void RenderWidgetHostViewMus::SetParentNativeViewAccessible( | 301 void RenderWidgetHostViewMus::SetParentNativeViewAccessible( |
297 gfx::NativeViewAccessible accessible_parent) {} | 302 gfx::NativeViewAccessible accessible_parent) {} |
298 | 303 |
299 gfx::NativeViewId RenderWidgetHostViewMus::GetParentForWindowlessPlugin() | 304 gfx::NativeViewId RenderWidgetHostViewMus::GetParentForWindowlessPlugin() |
300 const { | 305 const { |
301 return gfx::NativeViewId(); | 306 return gfx::NativeViewId(); |
302 } | 307 } |
303 #endif | 308 #endif |
304 | 309 |
305 } // namespace content | 310 } // namespace content |
OLD | NEW |