| 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/tab_contents/tab_contents_view_win.h" | 5 #include "content/browser/tab_contents/tab_contents_view_win.h" |
| 6 | 6 |
| 7 #include "content/browser/renderer_host/render_view_host.h" | 7 #include "content/browser/renderer_host/render_view_host.h" |
| 8 #include "content/browser/renderer_host/render_view_host_factory.h" | 8 #include "content/browser/renderer_host/render_view_host_factory.h" |
| 9 #include "content/browser/renderer_host/render_widget_host_view_win.h" | 9 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
| 10 #include "content/browser/tab_contents/interstitial_page_impl.h" | 10 #include "content/browser/tab_contents/interstitial_page_impl.h" |
| 11 #include "content/browser/tab_contents/tab_contents.h" | 11 #include "content/browser/tab_contents/tab_contents.h" |
| 12 #include "content/public/browser/web_contents_delegate.h" | 12 #include "content/public/browser/web_contents_delegate.h" |
| 13 | 13 |
| 14 using content::RenderWidgetHostView; |
| 14 using content::WebContents; | 15 using content::WebContents; |
| 15 | 16 |
| 16 namespace { | 17 namespace { |
| 17 | 18 |
| 18 // We need to have a parent window for the compositing code to work correctly. | 19 // We need to have a parent window for the compositing code to work correctly. |
| 19 // | 20 // |
| 20 // A tab will not have a parent HWND whenever it is not active in its | 21 // A tab will not have a parent HWND whenever it is not active in its |
| 21 // host window - for example at creation time and when it's in the | 22 // host window - for example at creation time and when it's in the |
| 22 // background, so we provide a default widget to host them. | 23 // background, so we provide a default widget to host them. |
| 23 // | 24 // |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 290 |
| 290 gfx::Size size(window_pos->cx, window_pos->cy); | 291 gfx::Size size(window_pos->cx, window_pos->cy); |
| 291 if (tab_contents_->GetInterstitialPage()) | 292 if (tab_contents_->GetInterstitialPage()) |
| 292 tab_contents_->GetInterstitialPage()->SetSize(size); | 293 tab_contents_->GetInterstitialPage()->SetSize(size); |
| 293 RenderWidgetHostView* rwhv = tab_contents_->GetRenderWidgetHostView(); | 294 RenderWidgetHostView* rwhv = tab_contents_->GetRenderWidgetHostView(); |
| 294 if (rwhv) | 295 if (rwhv) |
| 295 rwhv->SetSize(size); | 296 rwhv->SetSize(size); |
| 296 | 297 |
| 297 return 0; | 298 return 0; |
| 298 } | 299 } |
| OLD | NEW |