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

Side by Side Diff: content/browser/web_contents/web_contents_view_child_frame.cc

Issue 2317563004: Change blink::WebScreenInfo to content::ScreenInfo (Closed)
Patch Set: Fix Windows compile Created 4 years, 3 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698