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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 #include "content/common/view_messages.h" | 86 #include "content/common/view_messages.h" |
87 #include "net/base/net_util.h" | 87 #include "net/base/net_util.h" |
88 #include "net/base/registry_controlled_domain.h" | 88 #include "net/base/registry_controlled_domain.h" |
89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
90 #include "ui/base/resource/resource_bundle.h" | 90 #include "ui/base/resource/resource_bundle.h" |
91 #include "ui/gfx/codec/png_codec.h" | 91 #include "ui/gfx/codec/png_codec.h" |
92 #include "webkit/glue/password_form.h" | 92 #include "webkit/glue/password_form.h" |
93 #include "webkit/glue/webpreferences.h" | 93 #include "webkit/glue/webpreferences.h" |
94 | 94 |
95 #if defined(OS_MACOSX) | 95 #if defined(OS_MACOSX) |
96 #include "app/surface/io_surface_support_mac.h" | 96 #include "ui/gfx/surface/io_surface_support_mac.h" |
97 #endif // defined(OS_MACOSX) | 97 #endif // defined(OS_MACOSX) |
98 | 98 |
99 // Cross-Site Navigations | 99 // Cross-Site Navigations |
100 // | 100 // |
101 // If a TabContents is told to navigate to a different web site (as determined | 101 // If a TabContents is told to navigate to a different web site (as determined |
102 // by SiteInstance), it will replace its current RenderViewHost with a new | 102 // by SiteInstance), it will replace its current RenderViewHost with a new |
103 // RenderViewHost dedicated to the new SiteInstance. This works as follows: | 103 // RenderViewHost dedicated to the new SiteInstance. This works as follows: |
104 // | 104 // |
105 // - Navigate determines whether the destination is cross-site, and if so, | 105 // - Navigate determines whether the destination is cross-site, and if so, |
106 // it creates a pending_render_view_host_ and moves into the PENDING | 106 // it creates a pending_render_view_host_ and moves into the PENDING |
(...skipping 2655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2762 | 2762 |
2763 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2763 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
2764 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 2764 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
2765 rwh_view->SetSize(view()->GetContainerSize()); | 2765 rwh_view->SetSize(view()->GetContainerSize()); |
2766 } | 2766 } |
2767 | 2767 |
2768 void TabContents::OnOnlineStateChanged(bool online) { | 2768 void TabContents::OnOnlineStateChanged(bool online) { |
2769 render_view_host()->Send(new ViewMsg_NetworkStateChanged( | 2769 render_view_host()->Send(new ViewMsg_NetworkStateChanged( |
2770 render_view_host()->routing_id(), online)); | 2770 render_view_host()->routing_id(), online)); |
2771 } | 2771 } |
OLD | NEW |