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 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1616 is_showing_before_unload_dialog_ = true; | 1616 is_showing_before_unload_dialog_ = true; |
1617 RunBeforeUnloadDialog(this, UTF16ToWideHack(message), reply_msg); | 1617 RunBeforeUnloadDialog(this, UTF16ToWideHack(message), reply_msg); |
1618 } | 1618 } |
1619 | 1619 |
1620 WebPreferences TabContents::GetWebkitPrefs() { | 1620 WebPreferences TabContents::GetWebkitPrefs() { |
1621 Profile* profile = render_view_host()->process()->profile(); | 1621 Profile* profile = render_view_host()->process()->profile(); |
1622 bool is_web_ui = false; | 1622 bool is_web_ui = false; |
1623 WebPreferences web_prefs = | 1623 WebPreferences web_prefs = |
1624 RenderViewHostDelegateHelper::GetWebkitPrefs(profile, is_web_ui); | 1624 RenderViewHostDelegateHelper::GetWebkitPrefs(profile, is_web_ui); |
1625 | 1625 |
1626 // Force accelerated compositing and 2d canvas off for chrome: and | 1626 // Force accelerated compositing and 2d canvas off for chrome:, about: and |
1627 // chrome-extension: pages. | 1627 // chrome-devtools: pages. |
1628 if (GetURL().SchemeIs(chrome::kChromeDevToolsScheme) || | 1628 if (GetURL().SchemeIs(chrome::kChromeDevToolsScheme) || |
1629 GetURL().SchemeIs(chrome::kChromeUIScheme)) { | 1629 GetURL().SchemeIs(chrome::kChromeUIScheme) || |
| 1630 GetURL().SchemeIs(chrome::kAboutScheme)) { |
1630 web_prefs.accelerated_compositing_enabled = false; | 1631 web_prefs.accelerated_compositing_enabled = false; |
1631 web_prefs.accelerated_2d_canvas_enabled = false; | 1632 web_prefs.accelerated_2d_canvas_enabled = false; |
1632 } | 1633 } |
1633 | 1634 |
1634 #if defined(OS_MACOSX) | 1635 #if defined(OS_MACOSX) |
1635 // Disable accelerated compositing if IOSurface's are not supported, | 1636 // Disable accelerated compositing if IOSurface's are not supported, |
1636 // as is the case in 10.5. | 1637 // as is the case in 10.5. |
1637 if (!IOSurfaceSupport::Initialize()) | 1638 if (!IOSurfaceSupport::Initialize()) |
1638 web_prefs.accelerated_compositing_enabled = false; | 1639 web_prefs.accelerated_compositing_enabled = false; |
1639 #endif | 1640 #endif |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1856 | 1857 |
1857 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 1858 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
1858 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 1859 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
1859 rwh_view->SetSize(view()->GetContainerSize()); | 1860 rwh_view->SetSize(view()->GetContainerSize()); |
1860 } | 1861 } |
1861 | 1862 |
1862 void TabContents::OnOnlineStateChanged(bool online) { | 1863 void TabContents::OnOnlineStateChanged(bool online) { |
1863 render_view_host()->Send(new ViewMsg_NetworkStateChanged( | 1864 render_view_host()->Send(new ViewMsg_NetworkStateChanged( |
1864 render_view_host()->routing_id(), online)); | 1865 render_view_host()->routing_id(), online)); |
1865 } | 1866 } |
OLD | NEW |