OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 #include "content/common/notification_service.h" | 90 #include "content/common/notification_service.h" |
91 #include "net/base/net_util.h" | 91 #include "net/base/net_util.h" |
92 #include "net/base/registry_controlled_domain.h" | 92 #include "net/base/registry_controlled_domain.h" |
93 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 93 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
94 #include "ui/base/resource/resource_bundle.h" | 94 #include "ui/base/resource/resource_bundle.h" |
95 #include "ui/gfx/codec/png_codec.h" | 95 #include "ui/gfx/codec/png_codec.h" |
96 #include "webkit/glue/password_form.h" | 96 #include "webkit/glue/password_form.h" |
97 #include "webkit/glue/webpreferences.h" | 97 #include "webkit/glue/webpreferences.h" |
98 | 98 |
99 #if defined(OS_MACOSX) | 99 #if defined(OS_MACOSX) |
100 #include "app/surface/io_surface_support_mac.h" | 100 #include "ui/gfx/surface/io_surface_support_mac.h" |
101 #endif // defined(OS_MACOSX) | 101 #endif // defined(OS_MACOSX) |
102 | 102 |
103 // Cross-Site Navigations | 103 // Cross-Site Navigations |
104 // | 104 // |
105 // If a TabContents is told to navigate to a different web site (as determined | 105 // If a TabContents is told to navigate to a different web site (as determined |
106 // by SiteInstance), it will replace its current RenderViewHost with a new | 106 // by SiteInstance), it will replace its current RenderViewHost with a new |
107 // RenderViewHost dedicated to the new SiteInstance. This works as follows: | 107 // RenderViewHost dedicated to the new SiteInstance. This works as follows: |
108 // | 108 // |
109 // - Navigate determines whether the destination is cross-site, and if so, | 109 // - Navigate determines whether the destination is cross-site, and if so, |
110 // it creates a pending_render_view_host_ and moves into the PENDING | 110 // it creates a pending_render_view_host_ and moves into the PENDING |
(...skipping 2703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2814 | 2814 |
2815 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2815 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
2816 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 2816 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
2817 rwh_view->SetSize(view()->GetContainerSize()); | 2817 rwh_view->SetSize(view()->GetContainerSize()); |
2818 } | 2818 } |
2819 | 2819 |
2820 void TabContents::OnOnlineStateChanged(bool online) { | 2820 void TabContents::OnOnlineStateChanged(bool online) { |
2821 render_view_host()->Send(new ViewMsg_NetworkStateChanged( | 2821 render_view_host()->Send(new ViewMsg_NetworkStateChanged( |
2822 render_view_host()->routing_id(), online)); | 2822 render_view_host()->routing_id(), online)); |
2823 } | 2823 } |
OLD | NEW |