| 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 <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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 // chrome-devtools: pages (unless it's specifically allowed). | 450 // chrome-devtools: pages (unless it's specifically allowed). |
| 451 if ((url.SchemeIs(chrome::kChromeDevToolsScheme) || | 451 if ((url.SchemeIs(chrome::kChromeDevToolsScheme) || |
| 452 url.SchemeIs(chrome::kChromeUIScheme) || | 452 url.SchemeIs(chrome::kChromeUIScheme) || |
| 453 (url.SchemeIs(chrome::kAboutScheme) && | 453 (url.SchemeIs(chrome::kAboutScheme) && |
| 454 url.spec() != chrome::kAboutBlankURL)) && | 454 url.spec() != chrome::kAboutBlankURL)) && |
| 455 !command_line.HasSwitch(switches::kAllowWebUICompositing)) { | 455 !command_line.HasSwitch(switches::kAllowWebUICompositing)) { |
| 456 prefs.accelerated_compositing_enabled = false; | 456 prefs.accelerated_compositing_enabled = false; |
| 457 prefs.accelerated_2d_canvas_enabled = false; | 457 prefs.accelerated_2d_canvas_enabled = false; |
| 458 } | 458 } |
| 459 | 459 |
| 460 content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, &prefs); | 460 content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); |
| 461 | 461 |
| 462 return prefs; | 462 return prefs; |
| 463 } | 463 } |
| 464 | 464 |
| 465 NavigationControllerImpl& TabContents::GetControllerImpl() { | 465 NavigationControllerImpl& TabContents::GetControllerImpl() { |
| 466 return controller_; | 466 return controller_; |
| 467 } | 467 } |
| 468 | 468 |
| 469 RenderViewHostManager* TabContents::GetRenderManagerForTesting() { | 469 RenderViewHostManager* TabContents::GetRenderManagerForTesting() { |
| 470 return &render_manager_; | 470 return &render_manager_; |
| (...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2472 save_info, | 2472 save_info, |
| 2473 this); | 2473 this); |
| 2474 } | 2474 } |
| 2475 | 2475 |
| 2476 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2476 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
| 2477 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2477 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); |
| 2478 // Can be NULL during tests. | 2478 // Can be NULL during tests. |
| 2479 if (rwh_view) | 2479 if (rwh_view) |
| 2480 rwh_view->SetSize(GetView()->GetContainerSize()); | 2480 rwh_view->SetSize(GetView()->GetContainerSize()); |
| 2481 } | 2481 } |
| OLD | NEW |