| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 #include "core/editing/FrameSelection.h" | 115 #include "core/editing/FrameSelection.h" |
| 116 #include "core/editing/InputMethodController.h" | 116 #include "core/editing/InputMethodController.h" |
| 117 #include "core/editing/PlainTextRange.h" | 117 #include "core/editing/PlainTextRange.h" |
| 118 #include "core/editing/TextAffinity.h" | 118 #include "core/editing/TextAffinity.h" |
| 119 #include "core/editing/iterators/TextIterator.h" | 119 #include "core/editing/iterators/TextIterator.h" |
| 120 #include "core/editing/markers/DocumentMarkerController.h" | 120 #include "core/editing/markers/DocumentMarkerController.h" |
| 121 #include "core/editing/serializers/Serialization.h" | 121 #include "core/editing/serializers/Serialization.h" |
| 122 #include "core/editing/spellcheck/SpellChecker.h" | 122 #include "core/editing/spellcheck/SpellChecker.h" |
| 123 #include "core/exported/WebAssociatedURLLoaderImpl.h" | 123 #include "core/exported/WebAssociatedURLLoaderImpl.h" |
| 124 #include "core/exported/WebDataSourceImpl.h" | 124 #include "core/exported/WebDataSourceImpl.h" |
| 125 #include "core/exported/WebViewBase.h" |
| 125 #include "core/frame/FrameView.h" | 126 #include "core/frame/FrameView.h" |
| 126 #include "core/frame/LocalDOMWindow.h" | 127 #include "core/frame/LocalDOMWindow.h" |
| 127 #include "core/frame/PageScaleConstraintsSet.h" | 128 #include "core/frame/PageScaleConstraintsSet.h" |
| 128 #include "core/frame/RemoteFrame.h" | 129 #include "core/frame/RemoteFrame.h" |
| 129 #include "core/frame/ScreenOrientationController.h" | 130 #include "core/frame/ScreenOrientationController.h" |
| 130 #include "core/frame/Settings.h" | 131 #include "core/frame/Settings.h" |
| 131 #include "core/frame/SmartClip.h" | 132 #include "core/frame/SmartClip.h" |
| 132 #include "core/frame/SuspendableScriptExecutor.h" | 133 #include "core/frame/SuspendableScriptExecutor.h" |
| 133 #include "core/frame/UseCounter.h" | 134 #include "core/frame/UseCounter.h" |
| 134 #include "core/frame/VisualViewport.h" | 135 #include "core/frame/VisualViewport.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 #include "skia/ext/platform_canvas.h" | 225 #include "skia/ext/platform_canvas.h" |
| 225 #include "web/CompositionUnderlineVectorBuilder.h" | 226 #include "web/CompositionUnderlineVectorBuilder.h" |
| 226 #include "web/RemoteFrameOwner.h" | 227 #include "web/RemoteFrameOwner.h" |
| 227 #include "web/SharedWorkerRepositoryClientImpl.h" | 228 #include "web/SharedWorkerRepositoryClientImpl.h" |
| 228 #include "web/TextCheckerClientImpl.h" | 229 #include "web/TextCheckerClientImpl.h" |
| 229 #include "web/TextFinder.h" | 230 #include "web/TextFinder.h" |
| 230 #include "web/WebDevToolsAgentImpl.h" | 231 #include "web/WebDevToolsAgentImpl.h" |
| 231 #include "web/WebFrameWidgetImpl.h" | 232 #include "web/WebFrameWidgetImpl.h" |
| 232 #include "web/WebPluginContainerImpl.h" | 233 #include "web/WebPluginContainerImpl.h" |
| 233 #include "web/WebRemoteFrameImpl.h" | 234 #include "web/WebRemoteFrameImpl.h" |
| 234 #include "web/WebViewImpl.h" | |
| 235 | 235 |
| 236 namespace blink { | 236 namespace blink { |
| 237 | 237 |
| 238 static int g_frame_count = 0; | 238 static int g_frame_count = 0; |
| 239 | 239 |
| 240 static HeapVector<ScriptSourceCode> CreateSourcesVector( | 240 static HeapVector<ScriptSourceCode> CreateSourcesVector( |
| 241 const WebScriptSource* sources_in, | 241 const WebScriptSource* sources_in, |
| 242 unsigned num_sources) { | 242 unsigned num_sources) { |
| 243 HeapVector<ScriptSourceCode> sources; | 243 HeapVector<ScriptSourceCode> sources; |
| 244 sources.Append(sources_in, num_sources); | 244 sources.Append(sources_in, num_sources); |
| (...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1731 if (text_finder_ && text_finder_->TotalMatchCount() > 0) | 1731 if (text_finder_ && text_finder_->TotalMatchCount() > 0) |
| 1732 text_finder_->IncreaseMarkerVersion(); | 1732 text_finder_->IncreaseMarkerVersion(); |
| 1733 } | 1733 } |
| 1734 | 1734 |
| 1735 void WebLocalFrameImpl::CreateFrameView() { | 1735 void WebLocalFrameImpl::CreateFrameView() { |
| 1736 TRACE_EVENT0("blink", "WebLocalFrameImpl::createFrameView"); | 1736 TRACE_EVENT0("blink", "WebLocalFrameImpl::createFrameView"); |
| 1737 | 1737 |
| 1738 DCHECK(GetFrame()); // If frame() doesn't exist, we probably didn't init | 1738 DCHECK(GetFrame()); // If frame() doesn't exist, we probably didn't init |
| 1739 // properly. | 1739 // properly. |
| 1740 | 1740 |
| 1741 WebViewImpl* web_view = ViewImpl(); | 1741 WebViewBase* web_view = ViewImpl(); |
| 1742 | 1742 |
| 1743 // Check if we're shutting down. | 1743 // Check if we're shutting down. |
| 1744 if (!web_view->GetPage()) | 1744 if (!web_view->GetPage()) |
| 1745 return; | 1745 return; |
| 1746 | 1746 |
| 1747 bool is_main_frame = !Parent(); | 1747 bool is_main_frame = !Parent(); |
| 1748 IntSize initial_size = (is_main_frame || !FrameWidget()) | 1748 IntSize initial_size = (is_main_frame || !FrameWidget()) |
| 1749 ? web_view->MainFrameSize() | 1749 ? web_view->MainFrameSize() |
| 1750 : (IntSize)FrameWidget()->Size(); | 1750 : (IntSize)FrameWidget()->Size(); |
| 1751 Color base_background_color = web_view->BaseBackgroundColor(); | 1751 Color base_background_color = web_view->BaseBackgroundColor(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1780 return ToLocalFrameClientImpl(client)->GetWebFrame(); | 1780 return ToLocalFrameClientImpl(client)->GetWebFrame(); |
| 1781 } | 1781 } |
| 1782 | 1782 |
| 1783 WebLocalFrameImpl* WebLocalFrameImpl::FromFrameOwnerElement(Element* element) { | 1783 WebLocalFrameImpl* WebLocalFrameImpl::FromFrameOwnerElement(Element* element) { |
| 1784 if (!element->IsFrameOwnerElement()) | 1784 if (!element->IsFrameOwnerElement()) |
| 1785 return nullptr; | 1785 return nullptr; |
| 1786 return FromFrame( | 1786 return FromFrame( |
| 1787 ToLocalFrame(ToHTMLFrameOwnerElement(element)->ContentFrame())); | 1787 ToLocalFrame(ToHTMLFrameOwnerElement(element)->ContentFrame())); |
| 1788 } | 1788 } |
| 1789 | 1789 |
| 1790 WebViewImpl* WebLocalFrameImpl::ViewImpl() const { | 1790 WebViewBase* WebLocalFrameImpl::ViewImpl() const { |
| 1791 if (!GetFrame()) | 1791 if (!GetFrame()) |
| 1792 return nullptr; | 1792 return nullptr; |
| 1793 return WebViewImpl::FromPage(GetFrame()->GetPage()); | 1793 return WebViewImpl::FromPage(GetFrame()->GetPage()); |
| 1794 } | 1794 } |
| 1795 | 1795 |
| 1796 WebDataSourceImpl* WebLocalFrameImpl::DataSourceImpl() const { | 1796 WebDataSourceImpl* WebLocalFrameImpl::DataSourceImpl() const { |
| 1797 return static_cast<WebDataSourceImpl*>(DataSource()); | 1797 return static_cast<WebDataSourceImpl*>(DataSource()); |
| 1798 } | 1798 } |
| 1799 | 1799 |
| 1800 WebDataSourceImpl* WebLocalFrameImpl::ProvisionalDataSourceImpl() const { | 1800 WebDataSourceImpl* WebLocalFrameImpl::ProvisionalDataSourceImpl() const { |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2575 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { | 2575 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { |
| 2576 return *text_checker_client_; | 2576 return *text_checker_client_; |
| 2577 } | 2577 } |
| 2578 | 2578 |
| 2579 void WebLocalFrameImpl::SetTextCheckClient( | 2579 void WebLocalFrameImpl::SetTextCheckClient( |
| 2580 WebTextCheckClient* text_check_client) { | 2580 WebTextCheckClient* text_check_client) { |
| 2581 text_check_client_ = text_check_client; | 2581 text_check_client_ = text_check_client; |
| 2582 } | 2582 } |
| 2583 | 2583 |
| 2584 } // namespace blink | 2584 } // namespace blink |
| OLD | NEW |