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 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1791 } | 1791 } |
1792 | 1792 |
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 // TODO(aa): It seems like ths should pass |true| if this tab_contents has a | |
1802 // web_ui, doesn't it? | |
jam
2011/10/27 17:10:24
you can just do (ChildProcessSecurityPolicy::GetIn
Aaron Boodman
2011/10/27 22:47:23
Ok, but isn't it a bug in current Chrome that it d
jam
2011/10/28 16:20:50
I don't understand what you mean? I thought you we
| |
1801 WebPreferences web_prefs = | 1803 WebPreferences web_prefs = |
1802 content::GetContentClient()->browser()->GetWebkitPrefs( | 1804 content::GetContentClient()->browser()->GetWebkitPrefs( |
1803 render_view_host()->process()->browser_context(), false); | 1805 render_view_host(), false); |
1804 | 1806 |
1805 // Force accelerated compositing and 2d canvas off for chrome:, about: and | 1807 // Force accelerated compositing and 2d canvas off for chrome:, about: and |
1806 // chrome-devtools: pages (unless it's specifically allowed). | 1808 // chrome-devtools: pages (unless it's specifically allowed). |
1807 if ((GetURL().SchemeIs(chrome::kChromeDevToolsScheme) || | 1809 if ((GetURL().SchemeIs(chrome::kChromeDevToolsScheme) || |
1808 #if !defined(TOUCH_UI) | 1810 #if !defined(TOUCH_UI) |
1809 // Allow accelerated compositing for keyboard and log in screen. | 1811 // Allow accelerated compositing for keyboard and log in screen. |
1810 GetURL().SchemeIs(chrome::kChromeUIScheme) || | 1812 GetURL().SchemeIs(chrome::kChromeUIScheme) || |
1811 #endif | 1813 #endif |
1812 (GetURL().SchemeIs(chrome::kAboutScheme) && | 1814 (GetURL().SchemeIs(chrome::kAboutScheme) && |
1813 GetURL().spec() != chrome::kAboutBlankURL)) && | 1815 GetURL().spec() != chrome::kAboutBlankURL)) && |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1999 | 2001 |
2000 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2002 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
2001 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 2003 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
2002 rwh_view->SetSize(view()->GetContainerSize()); | 2004 rwh_view->SetSize(view()->GetContainerSize()); |
2003 } | 2005 } |
2004 | 2006 |
2005 bool TabContents::GotResponseToLockMouseRequest(bool allowed) { | 2007 bool TabContents::GotResponseToLockMouseRequest(bool allowed) { |
2006 return render_view_host() ? | 2008 return render_view_host() ? |
2007 render_view_host()->GotResponseToLockMouseRequest(allowed) : false; | 2009 render_view_host()->GotResponseToLockMouseRequest(allowed) : false; |
2008 } | 2010 } |
2009 | |
OLD | NEW |