| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_win.h" | 5 #include "content/browser/web_contents/web_contents_view_win.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
| 9 #include "content/browser/renderer_host/render_view_host_factory.h" | 9 #include "content/browser/renderer_host/render_view_host_factory.h" |
| 10 #include "content/browser/renderer_host/render_view_host_impl.h" | 10 #include "content/browser/renderer_host/render_view_host_impl.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 | 133 |
| 134 RenderWidgetHostViewWin* view = static_cast<RenderWidgetHostViewWin*>( | 134 RenderWidgetHostViewWin* view = static_cast<RenderWidgetHostViewWin*>( |
| 135 RenderWidgetHostView::CreateViewForWidget(render_widget_host)); | 135 RenderWidgetHostView::CreateViewForWidget(render_widget_host)); |
| 136 view->CreateWnd(GetNativeView()); | 136 view->CreateWnd(GetNativeView()); |
| 137 view->ShowWindow(SW_SHOW); | 137 view->ShowWindow(SW_SHOW); |
| 138 view->SetSize(initial_size_); | 138 view->SetSize(initial_size_); |
| 139 return view; | 139 return view; |
| 140 } | 140 } |
| 141 | 141 |
| 142 RenderWidgetHostView* WebContentsViewWin::CreateViewForPopupWidget( |
| 143 RenderWidgetHost* render_widget_host) { |
| 144 return RenderWidgetHostViewPort::CreateViewForWidget(render_widget_host); |
| 145 } |
| 146 |
| 142 gfx::NativeView WebContentsViewWin::GetNativeView() const { | 147 gfx::NativeView WebContentsViewWin::GetNativeView() const { |
| 143 return hwnd(); | 148 return hwnd(); |
| 144 } | 149 } |
| 145 | 150 |
| 146 gfx::NativeView WebContentsViewWin::GetContentNativeView() const { | 151 gfx::NativeView WebContentsViewWin::GetContentNativeView() const { |
| 147 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); | 152 RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); |
| 148 return rwhv ? rwhv->GetNativeView() : NULL; | 153 return rwhv ? rwhv->GetNativeView() : NULL; |
| 149 } | 154 } |
| 150 | 155 |
| 151 gfx::NativeWindow WebContentsViewWin::GetTopLevelNativeWindow() const { | 156 gfx::NativeWindow WebContentsViewWin::GetTopLevelNativeWindow() const { |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 si.nPage = 10; | 474 si.nPage = 10; |
| 470 si.nPos = 50; | 475 si.nPos = 50; |
| 471 | 476 |
| 472 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); | 477 ::SetScrollInfo(hwnd(), SB_HORZ, &si, FALSE); |
| 473 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); | 478 ::SetScrollInfo(hwnd(), SB_VERT, &si, FALSE); |
| 474 | 479 |
| 475 return 1; | 480 return 1; |
| 476 } | 481 } |
| 477 | 482 |
| 478 } // namespace content | 483 } // namespace content |
| OLD | NEW |