OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame_host/render_widget_host_view_child_frame.h" | 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
6 | 6 |
7 #include "content/browser/frame_host/cross_process_frame_connector.h" | 7 #include "content/browser/frame_host/cross_process_frame_connector.h" |
8 #include "content/browser/renderer_host/render_widget_host_impl.h" | 8 #include "content/browser/renderer_host/render_widget_host_impl.h" |
9 #include "content/common/gpu/gpu_messages.h" | 9 #include "content/common/gpu/gpu_messages.h" |
10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 void RenderWidgetHostViewChildFrame::InitAsChild( | 25 void RenderWidgetHostViewChildFrame::InitAsChild( |
26 gfx::NativeView parent_view) { | 26 gfx::NativeView parent_view) { |
27 NOTREACHED(); | 27 NOTREACHED(); |
28 } | 28 } |
29 | 29 |
30 RenderWidgetHost* RenderWidgetHostViewChildFrame::GetRenderWidgetHost() const { | 30 RenderWidgetHost* RenderWidgetHostViewChildFrame::GetRenderWidgetHost() const { |
31 return host_; | 31 return host_; |
32 } | 32 } |
33 | 33 |
34 void RenderWidgetHostViewChildFrame::SetSize(const gfx::Size& size) { | 34 void RenderWidgetHostViewChildFrame::SetSize(const gfx::Size& size) { |
35 size_ = size; | |
36 host_->WasResized(); | 35 host_->WasResized(); |
37 } | 36 } |
38 | 37 |
39 void RenderWidgetHostViewChildFrame::SetBounds(const gfx::Rect& rect) { | 38 void RenderWidgetHostViewChildFrame::SetBounds(const gfx::Rect& rect) { |
40 SetSize(rect.size()); | 39 SetSize(rect.size()); |
41 } | 40 } |
42 | 41 |
43 void RenderWidgetHostViewChildFrame::Focus() { | 42 void RenderWidgetHostViewChildFrame::Focus() { |
44 } | 43 } |
45 | 44 |
(...skipping 15 matching lines...) Expand all Loading... |
61 } | 60 } |
62 | 61 |
63 bool RenderWidgetHostViewChildFrame::IsShowing() { | 62 bool RenderWidgetHostViewChildFrame::IsShowing() { |
64 return !host_->is_hidden(); | 63 return !host_->is_hidden(); |
65 } | 64 } |
66 | 65 |
67 gfx::Rect RenderWidgetHostViewChildFrame::GetViewBounds() const { | 66 gfx::Rect RenderWidgetHostViewChildFrame::GetViewBounds() const { |
68 gfx::Rect rect; | 67 gfx::Rect rect; |
69 if (frame_connector_) | 68 if (frame_connector_) |
70 rect = frame_connector_->ChildFrameRect(); | 69 rect = frame_connector_->ChildFrameRect(); |
71 rect.set_width(size_.width()); | |
72 rect.set_height(size_.height()); | |
73 return rect; | 70 return rect; |
74 } | 71 } |
75 | 72 |
76 gfx::NativeView RenderWidgetHostViewChildFrame::GetNativeView() const { | 73 gfx::NativeView RenderWidgetHostViewChildFrame::GetNativeView() const { |
77 NOTREACHED(); | 74 NOTREACHED(); |
78 return NULL; | 75 return NULL; |
79 } | 76 } |
80 | 77 |
81 gfx::NativeViewId RenderWidgetHostViewChildFrame::GetNativeViewId() const { | 78 gfx::NativeViewId RenderWidgetHostViewChildFrame::GetNativeViewId() const { |
82 NOTREACHED(); | 79 NOTREACHED(); |
83 return 0; | 80 return 0; |
84 } | 81 } |
85 | 82 |
86 gfx::NativeViewAccessible | 83 gfx::NativeViewAccessible |
87 RenderWidgetHostViewChildFrame::GetNativeViewAccessible() { | 84 RenderWidgetHostViewChildFrame::GetNativeViewAccessible() { |
88 NOTREACHED(); | 85 NOTREACHED(); |
89 return NULL; | 86 return NULL; |
90 } | 87 } |
91 | 88 |
92 void RenderWidgetHostViewChildFrame::SetBackground( | 89 void RenderWidgetHostViewChildFrame::SetBackground( |
93 const SkBitmap& background) { | 90 const SkBitmap& background) { |
94 } | 91 } |
95 | 92 |
96 gfx::Size RenderWidgetHostViewChildFrame::GetPhysicalBackingSize() const { | 93 gfx::Size RenderWidgetHostViewChildFrame::GetPhysicalBackingSize() const { |
97 return size_; | 94 gfx::Size size; |
| 95 if (frame_connector_) |
| 96 size = frame_connector_->ChildFrameRect().size(); |
| 97 return size; |
98 } | 98 } |
99 | 99 |
100 void RenderWidgetHostViewChildFrame::InitAsPopup( | 100 void RenderWidgetHostViewChildFrame::InitAsPopup( |
101 RenderWidgetHostView* parent_host_view, | 101 RenderWidgetHostView* parent_host_view, |
102 const gfx::Rect& pos) { | 102 const gfx::Rect& pos) { |
103 NOTREACHED(); | 103 NOTREACHED(); |
104 } | 104 } |
105 | 105 |
106 void RenderWidgetHostViewChildFrame::InitAsFullscreen( | 106 void RenderWidgetHostViewChildFrame::InitAsFullscreen( |
107 RenderWidgetHostView* reference_host_view) { | 107 RenderWidgetHostView* reference_host_view) { |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 gfx::NativeViewAccessible accessible_parent) { | 356 gfx::NativeViewAccessible accessible_parent) { |
357 } | 357 } |
358 | 358 |
359 gfx::NativeViewId RenderWidgetHostViewChildFrame::GetParentForWindowlessPlugin() | 359 gfx::NativeViewId RenderWidgetHostViewChildFrame::GetParentForWindowlessPlugin() |
360 const { | 360 const { |
361 return NULL; | 361 return NULL; |
362 } | 362 } |
363 #endif // defined(OS_WIN) | 363 #endif // defined(OS_WIN) |
364 | 364 |
365 } // namespace content | 365 } // namespace content |
OLD | NEW |