| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "sky/engine/core/events/KeyboardEvent.h" | 46 #include "sky/engine/core/events/KeyboardEvent.h" |
| 47 #include "sky/engine/core/frame/FrameHost.h" | 47 #include "sky/engine/core/frame/FrameHost.h" |
| 48 #include "sky/engine/core/frame/FrameView.h" | 48 #include "sky/engine/core/frame/FrameView.h" |
| 49 #include "sky/engine/core/frame/LocalFrame.h" | 49 #include "sky/engine/core/frame/LocalFrame.h" |
| 50 #include "sky/engine/core/frame/NewEventHandler.h" | 50 #include "sky/engine/core/frame/NewEventHandler.h" |
| 51 #include "sky/engine/core/frame/Settings.h" | 51 #include "sky/engine/core/frame/Settings.h" |
| 52 #include "sky/engine/core/html/HTMLImportElement.h" | 52 #include "sky/engine/core/html/HTMLImportElement.h" |
| 53 #include "sky/engine/core/loader/FrameLoader.h" | 53 #include "sky/engine/core/loader/FrameLoader.h" |
| 54 #include "sky/engine/core/loader/UniqueIdentifier.h" | 54 #include "sky/engine/core/loader/UniqueIdentifier.h" |
| 55 #include "sky/engine/core/page/AutoscrollController.h" | 55 #include "sky/engine/core/page/AutoscrollController.h" |
| 56 #include "sky/engine/core/page/Chrome.h" | |
| 57 #include "sky/engine/core/page/EventHandler.h" | 56 #include "sky/engine/core/page/EventHandler.h" |
| 58 #include "sky/engine/core/page/FocusController.h" | 57 #include "sky/engine/core/page/FocusController.h" |
| 59 #include "sky/engine/core/page/Page.h" | 58 #include "sky/engine/core/page/Page.h" |
| 60 #include "sky/engine/core/rendering/RenderView.h" | 59 #include "sky/engine/core/rendering/RenderView.h" |
| 61 #include "sky/engine/platform/Cursor.h" | 60 #include "sky/engine/platform/Cursor.h" |
| 62 #include "sky/engine/platform/KeyboardCodes.h" | 61 #include "sky/engine/platform/KeyboardCodes.h" |
| 63 #include "sky/engine/platform/Logging.h" | 62 #include "sky/engine/platform/Logging.h" |
| 64 #include "sky/engine/platform/NotImplemented.h" | 63 #include "sky/engine/platform/NotImplemented.h" |
| 65 #include "sky/engine/platform/TraceEvent.h" | 64 #include "sky/engine/platform/TraceEvent.h" |
| 66 #include "sky/engine/platform/fonts/FontCache.h" | 65 #include "sky/engine/platform/fonts/FontCache.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 188 |
| 190 LocalFrame* WebViewImpl::focusedCoreFrame() const | 189 LocalFrame* WebViewImpl::focusedCoreFrame() const |
| 191 { | 190 { |
| 192 return m_page ? m_page->focusController().focusedOrMainFrame() : 0; | 191 return m_page ? m_page->focusController().focusedOrMainFrame() : 0; |
| 193 } | 192 } |
| 194 | 193 |
| 195 WebViewImpl* WebViewImpl::fromPage(Page* page) | 194 WebViewImpl* WebViewImpl::fromPage(Page* page) |
| 196 { | 195 { |
| 197 if (!page) | 196 if (!page) |
| 198 return 0; | 197 return 0; |
| 199 return static_cast<WebViewImpl*>(page->chrome().client().webView()); | 198 return static_cast<WebViewImpl*>(page->webView()); |
| 200 } | 199 } |
| 201 | 200 |
| 202 // WebWidget ------------------------------------------------------------------ | 201 // WebWidget ------------------------------------------------------------------ |
| 203 | 202 |
| 204 void WebViewImpl::close() | 203 void WebViewImpl::close() |
| 205 { | 204 { |
| 206 if (m_page) { | 205 if (m_page) { |
| 207 // Initiate shutdown for the entire frameset. This will cause a lot of | 206 // Initiate shutdown for the entire frameset. This will cause a lot of |
| 208 // notifications to be sent. | 207 // notifications to be sent. |
| 209 m_page->willBeDestroyed(); | 208 m_page->willBeDestroyed(); |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 | 815 |
| 817 bool WebViewImpl::isActive() const | 816 bool WebViewImpl::isActive() const |
| 818 { | 817 { |
| 819 return page() ? page()->focusController().isActive() : false; | 818 return page() ? page()->focusController().isActive() : false; |
| 820 } | 819 } |
| 821 | 820 |
| 822 void WebViewImpl::didCommitLoad(bool isNewNavigation, bool isNavigationWithinPag
e) | 821 void WebViewImpl::didCommitLoad(bool isNewNavigation, bool isNavigationWithinPag
e) |
| 823 { | 822 { |
| 824 } | 823 } |
| 825 | 824 |
| 826 void WebViewImpl::layoutUpdated(WebLocalFrameImpl* webframe) | |
| 827 { | |
| 828 if (!m_client) | |
| 829 return; | |
| 830 m_client->didUpdateLayout(); | |
| 831 } | |
| 832 | |
| 833 void WebViewImpl::setBackgroundColorOverride(WebColor color) | 825 void WebViewImpl::setBackgroundColorOverride(WebColor color) |
| 834 { | 826 { |
| 835 m_backgroundColorOverride = color; | 827 m_backgroundColorOverride = color; |
| 836 } | 828 } |
| 837 | 829 |
| 838 Element* WebViewImpl::focusedElement() const | 830 Element* WebViewImpl::focusedElement() const |
| 839 { | 831 { |
| 840 LocalFrame* frame = m_page->focusController().focusedFrame(); | 832 LocalFrame* frame = m_page->focusController().focusedFrame(); |
| 841 if (!frame) | 833 if (!frame) |
| 842 return 0; | 834 return 0; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 863 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, | 855 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, |
| 864 bool isInitialState) { | 856 bool isInitialState) { |
| 865 if (!page()) | 857 if (!page()) |
| 866 return; | 858 return; |
| 867 | 859 |
| 868 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden); | 860 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden); |
| 869 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); | 861 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); |
| 870 } | 862 } |
| 871 | 863 |
| 872 } // namespace blink | 864 } // namespace blink |
| OLD | NEW |