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 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 // Double check that here. | 1056 // Double check that here. |
1057 int enabled_bindings = dest_render_view_host->GetEnabledBindings(); | 1057 int enabled_bindings = dest_render_view_host->GetEnabledBindings(); |
1058 WebUIControllerFactory* factory = | 1058 WebUIControllerFactory* factory = |
1059 content::GetContentClient()->browser()->GetWebUIControllerFactory(); | 1059 content::GetContentClient()->browser()->GetWebUIControllerFactory(); |
1060 bool is_allowed_in_web_ui_renderer = | 1060 bool is_allowed_in_web_ui_renderer = |
1061 factory && | 1061 factory && |
1062 factory->IsURLAcceptableForWebUI(GetBrowserContext(), entry.GetURL()); | 1062 factory->IsURLAcceptableForWebUI(GetBrowserContext(), entry.GetURL()); |
1063 #if defined(OS_CHROMEOS) | 1063 #if defined(OS_CHROMEOS) |
1064 is_allowed_in_web_ui_renderer |= entry.GetURL().SchemeIs(chrome::kDataScheme); | 1064 is_allowed_in_web_ui_renderer |= entry.GetURL().SchemeIs(chrome::kDataScheme); |
1065 #endif | 1065 #endif |
1066 CHECK(!(enabled_bindings & content::BINDINGS_POLICY_WEB_UI) || | 1066 if ((enabled_bindings & content::BINDINGS_POLICY_WEB_UI) && |
1067 is_allowed_in_web_ui_renderer); | 1067 !is_allowed_in_web_ui_renderer) { |
| 1068 // Log the URL to help us diagnose http://crbug.com/72235. |
| 1069 content::GetContentClient()->SetActiveURL(entry.GetURL()); |
| 1070 CHECK(0); |
| 1071 } |
1068 | 1072 |
1069 // Tell DevTools agent that it is attached prior to the navigation. | 1073 // Tell DevTools agent that it is attached prior to the navigation. |
1070 DevToolsManagerImpl::GetInstance()->OnNavigatingToPendingEntry( | 1074 DevToolsManagerImpl::GetInstance()->OnNavigatingToPendingEntry( |
1071 GetRenderViewHost(), | 1075 GetRenderViewHost(), |
1072 dest_render_view_host, | 1076 dest_render_view_host, |
1073 entry.GetURL()); | 1077 entry.GetURL()); |
1074 | 1078 |
1075 // Used for page load time metrics. | 1079 // Used for page load time metrics. |
1076 current_load_start_ = base::TimeTicks::Now(); | 1080 current_load_start_ = base::TimeTicks::Now(); |
1077 | 1081 |
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2589 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2593 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
2590 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2594 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); |
2591 // Can be NULL during tests. | 2595 // Can be NULL during tests. |
2592 if (rwh_view) | 2596 if (rwh_view) |
2593 rwh_view->SetSize(GetView()->GetContainerSize()); | 2597 rwh_view->SetSize(GetView()->GetContainerSize()); |
2594 } | 2598 } |
2595 | 2599 |
2596 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() { | 2600 RenderViewHostImpl* TabContents::GetRenderViewHostImpl() { |
2597 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); | 2601 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); |
2598 } | 2602 } |
OLD | NEW |