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