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 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1793 is_showing_before_unload_dialog_ = true; | 1793 is_showing_before_unload_dialog_ = true; |
1794 dialog_creator_ = delegate_->GetJavaScriptDialogCreator(); | 1794 dialog_creator_ = delegate_->GetJavaScriptDialogCreator(); |
1795 dialog_creator_->RunBeforeUnloadDialog(this, | 1795 dialog_creator_->RunBeforeUnloadDialog(this, |
1796 message, | 1796 message, |
1797 reply_msg); | 1797 reply_msg); |
1798 } | 1798 } |
1799 | 1799 |
1800 WebPreferences TabContents::GetWebkitPrefs() { | 1800 WebPreferences TabContents::GetWebkitPrefs() { |
1801 WebPreferences web_prefs = | 1801 WebPreferences web_prefs = |
1802 content::GetContentClient()->browser()->GetWebkitPrefs( | 1802 content::GetContentClient()->browser()->GetWebkitPrefs( |
1803 render_view_host()->process()->browser_context(), false); | 1803 render_view_host()); |
1804 | 1804 |
1805 // Force accelerated compositing and 2d canvas off for chrome:, about: and | 1805 // Force accelerated compositing and 2d canvas off for chrome:, about: and |
1806 // chrome-devtools: pages (unless it's specifically allowed). | 1806 // chrome-devtools: pages (unless it's specifically allowed). |
1807 if ((GetURL().SchemeIs(chrome::kChromeDevToolsScheme) || | 1807 if ((GetURL().SchemeIs(chrome::kChromeDevToolsScheme) || |
1808 #if !defined(TOUCH_UI) | 1808 #if !defined(TOUCH_UI) |
1809 // Allow accelerated compositing for keyboard and log in screen. | 1809 // Allow accelerated compositing for keyboard and log in screen. |
1810 GetURL().SchemeIs(chrome::kChromeUIScheme) || | 1810 GetURL().SchemeIs(chrome::kChromeUIScheme) || |
1811 #endif | 1811 #endif |
1812 (GetURL().SchemeIs(chrome::kAboutScheme) && | 1812 (GetURL().SchemeIs(chrome::kAboutScheme) && |
1813 GetURL().spec() != chrome::kAboutBlankURL)) && | 1813 GetURL().spec() != chrome::kAboutBlankURL)) && |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1999 | 1999 |
2000 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2000 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
2001 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 2001 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
2002 rwh_view->SetSize(view()->GetContainerSize()); | 2002 rwh_view->SetSize(view()->GetContainerSize()); |
2003 } | 2003 } |
2004 | 2004 |
2005 bool TabContents::GotResponseToLockMouseRequest(bool allowed) { | 2005 bool TabContents::GotResponseToLockMouseRequest(bool allowed) { |
2006 return render_view_host() ? | 2006 return render_view_host() ? |
2007 render_view_host()->GotResponseToLockMouseRequest(allowed) : false; | 2007 render_view_host()->GotResponseToLockMouseRequest(allowed) : false; |
2008 } | 2008 } |
2009 | |
OLD | NEW |