Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 1156473002: Refactor FrameLoader loading interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed issue with inital history navigation in child frames Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #include "core/html/HTMLPlugInElement.h" 64 #include "core/html/HTMLPlugInElement.h"
65 #include "core/html/HTMLTextAreaElement.h" 65 #include "core/html/HTMLTextAreaElement.h"
66 #include "core/html/canvas/WebGLRenderingContext.h" 66 #include "core/html/canvas/WebGLRenderingContext.h"
67 #include "core/html/forms/PopupMenuClient.h" 67 #include "core/html/forms/PopupMenuClient.h"
68 #include "core/html/ime/InputMethodContext.h" 68 #include "core/html/ime/InputMethodContext.h"
69 #include "core/layout/LayoutPart.h" 69 #include "core/layout/LayoutPart.h"
70 #include "core/layout/LayoutView.h" 70 #include "core/layout/LayoutView.h"
71 #include "core/layout/TextAutosizer.h" 71 #include "core/layout/TextAutosizer.h"
72 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" 72 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h"
73 #include "core/loader/DocumentLoader.h" 73 #include "core/loader/DocumentLoader.h"
74 #include "core/loader/FrameLoadRequest.h"
74 #include "core/loader/FrameLoader.h" 75 #include "core/loader/FrameLoader.h"
75 #include "core/page/Chrome.h" 76 #include "core/page/Chrome.h"
76 #include "core/page/ContextMenuController.h" 77 #include "core/page/ContextMenuController.h"
77 #include "core/page/ContextMenuProvider.h" 78 #include "core/page/ContextMenuProvider.h"
78 #include "core/page/DragController.h" 79 #include "core/page/DragController.h"
79 #include "core/page/DragData.h" 80 #include "core/page/DragData.h"
80 #include "core/page/DragSession.h" 81 #include "core/page/DragSession.h"
81 #include "core/page/EventHandler.h" 82 #include "core/page/EventHandler.h"
82 #include "core/page/FocusController.h" 83 #include "core/page/FocusController.h"
83 #include "core/page/FrameTree.h" 84 #include "core/page/FrameTree.h"
(...skipping 2763 matching lines...) Expand 10 before | Expand all | Expand 10 after
2847 if (!m_page) 2848 if (!m_page)
2848 return; 2849 return;
2849 2850
2850 // Only change override encoding, don't change default encoding. 2851 // Only change override encoding, don't change default encoding.
2851 // Note that the new encoding must be 0 if it isn't supposed to be set. 2852 // Note that the new encoding must be 0 if it isn't supposed to be set.
2852 AtomicString newEncodingName; 2853 AtomicString newEncodingName;
2853 if (!encodingName.isEmpty()) 2854 if (!encodingName.isEmpty())
2854 newEncodingName = encodingName; 2855 newEncodingName = encodingName;
2855 m_page->frameHost().setOverrideEncoding(newEncodingName); 2856 m_page->frameHost().setOverrideEncoding(newEncodingName);
2856 2857
2857 if (m_page->mainFrame()->isLocalFrame()) 2858 if (m_page->mainFrame()->isLocalFrame()) {
2858 m_page->deprecatedLocalMainFrame()->loader().reload(NormalReload); 2859 if (!m_page->deprecatedLocalMainFrame()->loader().currentItem())
2860 return;
2861 FrameLoadRequest request = FrameLoader::frameRequestForReload(
2862 FrameLoader::resourceRequestForReload(
2863 m_page->deprecatedLocalMainFrame()->loader().currentItem(),
2864 *m_page->deprecatedLocalMainFrame(), FrameLoadTypeReload, KURL() , ClientRedirect),
2865 ClientRedirect);
2866 m_page->deprecatedLocalMainFrame()->loader().load(request, FrameLoadType Reload);
2867 }
2859 } 2868 }
2860 2869
2861 WebFrame* WebViewImpl::mainFrame() 2870 WebFrame* WebViewImpl::mainFrame()
2862 { 2871 {
2863 return WebFrame::fromFrame(m_page ? m_page->mainFrame() : 0); 2872 return WebFrame::fromFrame(m_page ? m_page->mainFrame() : 0);
2864 } 2873 }
2865 2874
2866 WebFrame* WebViewImpl::findFrameByName( 2875 WebFrame* WebViewImpl::findFrameByName(
2867 const WebString& name, WebFrame* relativeToFrame) 2876 const WebString& name, WebFrame* relativeToFrame)
2868 { 2877 {
(...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after
4529 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4538 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4530 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4539 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4531 } 4540 }
4532 4541
4533 void WebViewImpl::forceNextWebGLContextCreationToFail() 4542 void WebViewImpl::forceNextWebGLContextCreationToFail()
4534 { 4543 {
4535 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4544 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4536 } 4545 }
4537 4546
4538 } // namespace blink 4547 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698