| 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 GetWebUIFactory()->CreateWebUIForURL(this, GetURL()); | 1054 GetWebUIFactory()->CreateWebUIForURL(this, GetURL()); |
| 1055 // web_ui might be NULL if the URL refers to a non-existent extension. | 1055 // web_ui might be NULL if the URL refers to a non-existent extension. |
| 1056 if (web_ui) { | 1056 if (web_ui) { |
| 1057 render_manager_.SetWebUIPostCommit(web_ui); | 1057 render_manager_.SetWebUIPostCommit(web_ui); |
| 1058 web_ui->RenderViewCreated(render_view_host()); | 1058 web_ui->RenderViewCreated(render_view_host()); |
| 1059 } | 1059 } |
| 1060 } | 1060 } |
| 1061 opener_web_ui_type_ = WebUI::kNoWebUI; | 1061 opener_web_ui_type_ = WebUI::kNoWebUI; |
| 1062 } | 1062 } |
| 1063 | 1063 |
| 1064 if (details.is_user_initiated_main_frame_load()) { | 1064 if (details.is_navigation_to_different_page()) { |
| 1065 // Clear the status bubble. This is a workaround for a bug where WebKit | 1065 // Clear the status bubble. This is a workaround for a bug where WebKit |
| 1066 // doesn't let us know that the cursor left an element during a | 1066 // doesn't let us know that the cursor left an element during a |
| 1067 // transition (this is also why the mouse cursor remains as a hand after | 1067 // transition (this is also why the mouse cursor remains as a hand after |
| 1068 // clicking on a link); see bugs 1184641 and 980803. We don't want to | 1068 // clicking on a link); see bugs 1184641 and 980803. We don't want to |
| 1069 // clear the bubble when a user navigates to a named anchor in the same | 1069 // clear the bubble when a user navigates to a named anchor in the same |
| 1070 // page. | 1070 // page. |
| 1071 UpdateTargetURL(details.entry->page_id(), GURL()); | 1071 UpdateTargetURL(details.entry->page_id(), GURL()); |
| 1072 } | 1072 } |
| 1073 | 1073 |
| 1074 if (!details.is_in_page) { | 1074 if (!details.is_in_page) { |
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1838 | 1838 |
| 1839 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 1839 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
| 1840 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 1840 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
| 1841 rwh_view->SetSize(view()->GetContainerSize()); | 1841 rwh_view->SetSize(view()->GetContainerSize()); |
| 1842 } | 1842 } |
| 1843 | 1843 |
| 1844 void TabContents::OnOnlineStateChanged(bool online) { | 1844 void TabContents::OnOnlineStateChanged(bool online) { |
| 1845 render_view_host()->Send(new ViewMsg_NetworkStateChanged( | 1845 render_view_host()->Send(new ViewMsg_NetworkStateChanged( |
| 1846 render_view_host()->routing_id(), online)); | 1846 render_view_host()->routing_id(), online)); |
| 1847 } | 1847 } |
| OLD | NEW |