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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 132383005: Set correct viewport size for an out of process iframe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed obsolete test Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
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
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698