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.h" | 5 #include "content/browser/tab_contents/tab_contents.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 #include "webkit/glue/web_intent_data.h" | 65 #include "webkit/glue/web_intent_data.h" |
66 #include "webkit/glue/webpreferences.h" | 66 #include "webkit/glue/webpreferences.h" |
67 | 67 |
68 #if defined(USE_AURA) | 68 #if defined(USE_AURA) |
69 #include "content/browser/tab_contents/tab_contents_view_aura.h" | 69 #include "content/browser/tab_contents/tab_contents_view_aura.h" |
70 #elif defined(OS_WIN) | 70 #elif defined(OS_WIN) |
71 #include "content/browser/tab_contents/tab_contents_view_win.h" | 71 #include "content/browser/tab_contents/tab_contents_view_win.h" |
72 #elif defined(TOOLKIT_GTK) | 72 #elif defined(TOOLKIT_GTK) |
73 #include "content/browser/tab_contents/tab_contents_view_gtk.h" | 73 #include "content/browser/tab_contents/tab_contents_view_gtk.h" |
74 #elif defined(OS_MACOSX) | 74 #elif defined(OS_MACOSX) |
75 #include "content/browser/tab_contents/web_contents_view_mac.h" | 75 #include "content/browser/web_contents/web_contents_view_mac.h" |
76 #include "ui/gfx/surface/io_surface_support_mac.h" | 76 #include "ui/gfx/surface/io_surface_support_mac.h" |
77 #elif defined(OS_ANDROID) | 77 #elif defined(OS_ANDROID) |
78 #include "content/browser/tab_contents/web_contents_view_android.h" | 78 #include "content/browser/web_contents/web_contents_view_android.h" |
79 #endif | 79 #endif |
80 | 80 |
81 // Cross-Site Navigations | 81 // Cross-Site Navigations |
82 // | 82 // |
83 // If a WebContentsImpl is told to navigate to a different web site (as | 83 // If a WebContentsImpl is told to navigate to a different web site (as |
84 // determined by SiteInstance), it will replace its current RenderViewHost with | 84 // determined by SiteInstance), it will replace its current RenderViewHost with |
85 // a new RenderViewHost dedicated to the new SiteInstance. This works as | 85 // a new RenderViewHost dedicated to the new SiteInstance. This works as |
86 // follows: | 86 // follows: |
87 // | 87 // |
88 // - Navigate determines whether the destination is cross-site, and if so, | 88 // - Navigate determines whether the destination is cross-site, and if so, |
(...skipping 2526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2615 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2615 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
2616 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2616 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); |
2617 // Can be NULL during tests. | 2617 // Can be NULL during tests. |
2618 if (rwh_view) | 2618 if (rwh_view) |
2619 rwh_view->SetSize(GetView()->GetContainerSize()); | 2619 rwh_view->SetSize(GetView()->GetContainerSize()); |
2620 } | 2620 } |
2621 | 2621 |
2622 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { | 2622 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { |
2623 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); | 2623 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); |
2624 } | 2624 } |
OLD | NEW |