OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2006 return false; | 2006 return false; |
2007 return frame()->document()->fetcher()->requestCount(); | 2007 return frame()->document()->fetcher()->requestCount(); |
2008 } | 2008 } |
2009 | 2009 |
2010 void WebLocalFrameImpl::setCommittedFirstRealLoad() | 2010 void WebLocalFrameImpl::setCommittedFirstRealLoad() |
2011 { | 2011 { |
2012 ASSERT(frame()); | 2012 ASSERT(frame()); |
2013 ensureFrameLoaderHasCommitted(frame()->loader()); | 2013 ensureFrameLoaderHasCommitted(frame()->loader()); |
2014 } | 2014 } |
2015 | 2015 |
2016 void WebLocalFrameImpl::addStyleSheetByURL(const WebString& url) | |
2017 { | |
2018 RefPtrWillBeRawPtr<Element> styleElement = frame()->document()->createElemen
t(HTMLNames::linkTag, false); | |
2019 | |
2020 styleElement->setAttribute(HTMLNames::typeAttr, "text/css"); | |
2021 styleElement->setAttribute(HTMLNames::relAttr, "stylesheet"); | |
2022 styleElement->setAttribute(HTMLNames::hrefAttr, url); | |
2023 | |
2024 frame()->document()->head()->appendChild(styleElement.release(), IGNORE_EXCE
PTION); | |
2025 } | |
2026 | |
2027 void WebLocalFrameImpl::navigateToSandboxedMarkup(const WebData& markup) | |
2028 { | |
2029 ASSERT(document().securityOrigin().isUnique()); | |
2030 frame()->loader().forceSandboxFlags(SandboxAll); | |
2031 loadHTMLString(markup, document().url(), WebURL(), true); | |
2032 } | |
2033 | |
2034 void WebLocalFrameImpl::sendOrientationChangeEvent() | 2016 void WebLocalFrameImpl::sendOrientationChangeEvent() |
2035 { | 2017 { |
2036 if (!frame()) | 2018 if (!frame()) |
2037 return; | 2019 return; |
2038 | 2020 |
2039 // Screen Orientation API | 2021 // Screen Orientation API |
2040 if (ScreenOrientationController::from(*frame())) | 2022 if (ScreenOrientationController::from(*frame())) |
2041 ScreenOrientationController::from(*frame())->notifyOrientationChanged(); | 2023 ScreenOrientationController::from(*frame())->notifyOrientationChanged(); |
2042 | 2024 |
2043 // Legacy window.orientation API | 2025 // Legacy window.orientation API |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2113 { | 2095 { |
2114 m_frameWidget = frameWidget; | 2096 m_frameWidget = frameWidget; |
2115 } | 2097 } |
2116 | 2098 |
2117 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const | 2099 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const |
2118 { | 2100 { |
2119 return m_frameWidget; | 2101 return m_frameWidget; |
2120 } | 2102 } |
2121 | 2103 |
2122 } // namespace blink | 2104 } // namespace blink |
OLD | NEW |