OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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/web_contents/web_contents_view_child_frame.h" | 5 #include "content/browser/web_contents/web_contents_view_child_frame.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 8 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
10 #include "content/public/browser/web_contents_view_delegate.h" | 10 #include "content/public/browser/web_contents_view_delegate.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 } | 40 } |
41 | 41 |
42 gfx::NativeView WebContentsViewChildFrame::GetContentNativeView() const { | 42 gfx::NativeView WebContentsViewChildFrame::GetContentNativeView() const { |
43 return GetOuterView()->GetContentNativeView(); | 43 return GetOuterView()->GetContentNativeView(); |
44 } | 44 } |
45 | 45 |
46 gfx::NativeWindow WebContentsViewChildFrame::GetTopLevelNativeWindow() const { | 46 gfx::NativeWindow WebContentsViewChildFrame::GetTopLevelNativeWindow() const { |
47 return GetOuterView()->GetTopLevelNativeWindow(); | 47 return GetOuterView()->GetTopLevelNativeWindow(); |
48 } | 48 } |
49 | 49 |
50 void WebContentsViewChildFrame::GetScreenInfo( | 50 void WebContentsViewChildFrame::GetScreenInfo(ScreenInfo* screen_info) const { |
51 blink::WebScreenInfo* web_screen_info) const { | |
52 // TODO(wjmaclean): falling back to the default screen info is not what used | 51 // TODO(wjmaclean): falling back to the default screen info is not what used |
53 // to happen in RenderWidgetHostViewChildFrame, but it seems like the right | 52 // to happen in RenderWidgetHostViewChildFrame, but it seems like the right |
54 // thing to do. We should keep an eye on this in case the else-clause below | 53 // thing to do. We should keep an eye on this in case the else-clause below |
55 // causes problems. | 54 // causes problems. |
56 if (web_contents_->GetOuterWebContents()) | 55 if (web_contents_->GetOuterWebContents()) |
57 GetOuterView()->GetScreenInfo(web_screen_info); | 56 GetOuterView()->GetScreenInfo(screen_info); |
58 else | 57 else |
59 WebContentsView::GetDefaultScreenInfo(web_screen_info); | 58 WebContentsView::GetDefaultScreenInfo(screen_info); |
60 } | 59 } |
61 | 60 |
62 void WebContentsViewChildFrame::GetContainerBounds(gfx::Rect* out) const { | 61 void WebContentsViewChildFrame::GetContainerBounds(gfx::Rect* out) const { |
63 RenderWidgetHostView* view = web_contents_->GetRenderWidgetHostView(); | 62 RenderWidgetHostView* view = web_contents_->GetRenderWidgetHostView(); |
64 if (view) | 63 if (view) |
65 *out = view->GetViewBounds(); | 64 *out = view->GetViewBounds(); |
66 else | 65 else |
67 *out = gfx::Rect(); | 66 *out = gfx::Rect(); |
68 } | 67 } |
69 | 68 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 void WebContentsViewChildFrame::StartDragging( | 165 void WebContentsViewChildFrame::StartDragging( |
167 const DropData& drop_data, | 166 const DropData& drop_data, |
168 WebDragOperationsMask ops, | 167 WebDragOperationsMask ops, |
169 const gfx::ImageSkia& image, | 168 const gfx::ImageSkia& image, |
170 const gfx::Vector2d& image_offset, | 169 const gfx::Vector2d& image_offset, |
171 const DragEventSourceInfo& event_info) { | 170 const DragEventSourceInfo& event_info) { |
172 NOTREACHED(); | 171 NOTREACHED(); |
173 } | 172 } |
174 | 173 |
175 } // namespace content | 174 } // namespace content |
OLD | NEW |