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

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

Issue 736723002: Expose defersLoading API (for tests) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebView.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 } 949 }
950 950
951 void WebViewImpl::acceptLanguagesChanged() 951 void WebViewImpl::acceptLanguagesChanged()
952 { 952 {
953 if (!page()) 953 if (!page())
954 return; 954 return;
955 955
956 page()->acceptLanguagesChanged(); 956 page()->acceptLanguagesChanged();
957 } 957 }
958 958
959 bool WebViewImpl::defersLoading() const
960 {
961 return page() && page()->defersLoading();
962 }
963
964 void WebViewImpl::setDefersLoading(bool value)
965 {
966 if (page())
967 page()->setDefersLoading(value);
968 }
969
959 bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event) 970 bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event)
960 { 971 {
961 ASSERT((event.type == WebInputEvent::RawKeyDown) 972 ASSERT((event.type == WebInputEvent::RawKeyDown)
962 || (event.type == WebInputEvent::KeyDown) 973 || (event.type == WebInputEvent::KeyDown)
963 || (event.type == WebInputEvent::KeyUp)); 974 || (event.type == WebInputEvent::KeyUp));
964 975
965 // Halt an in-progress fling on a key event. 976 // Halt an in-progress fling on a key event.
966 endActiveFlingAnimation(); 977 endActiveFlingAnimation();
967 978
968 // Please refer to the comments explaining the m_suppressNextKeypressEvent 979 // Please refer to the comments explaining the m_suppressNextKeypressEvent
(...skipping 3544 matching lines...) Expand 10 before | Expand all | Expand 10 after
4513 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4524 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4514 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4525 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4515 } 4526 }
4516 4527
4517 void WebViewImpl::forceNextWebGLContextCreationToFail() 4528 void WebViewImpl::forceNextWebGLContextCreationToFail()
4518 { 4529 {
4519 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4530 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4520 } 4531 }
4521 4532
4522 } // namespace blink 4533 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698