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 bounds.set_x(10); | |
Fady Samuel
2015/11/30 23:06:54
Please add a TODO(fsamuel): above to figure out po
Peng
2015/12/01 15:22:46
Done.
| |
67 bounds.set_y(150); | |
68 bounds.set_size(size); | |
69 window_->window()->SetBounds(bounds); | |
66 host_->WasResized(); | 70 host_->WasResized(); |
67 } | 71 } |
68 | 72 |
69 void RenderWidgetHostViewMus::SetBounds(const gfx::Rect& rect) { | 73 void RenderWidgetHostViewMus::SetBounds(const gfx::Rect& rect) { |
70 SetSize(rect.size()); | 74 SetSize(rect.size()); |
71 } | 75 } |
72 | 76 |
73 void RenderWidgetHostViewMus::Focus() { | 77 void RenderWidgetHostViewMus::Focus() { |
74 // TODO(fsamuel): Request focus for the associated Mus::Window | 78 // TODO(fsamuel): Request focus for the associated Mus::Window |
75 // We need to be careful how we propagate focus as we navigate to and | 79 // 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( | 300 void RenderWidgetHostViewMus::SetParentNativeViewAccessible( |
297 gfx::NativeViewAccessible accessible_parent) {} | 301 gfx::NativeViewAccessible accessible_parent) {} |
298 | 302 |
299 gfx::NativeViewId RenderWidgetHostViewMus::GetParentForWindowlessPlugin() | 303 gfx::NativeViewId RenderWidgetHostViewMus::GetParentForWindowlessPlugin() |
300 const { | 304 const { |
301 return gfx::NativeViewId(); | 305 return gfx::NativeViewId(); |
302 } | 306 } |
303 #endif | 307 #endif |
304 | 308 |
305 } // namespace content | 309 } // namespace content |
OLD | NEW |