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

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

Issue 294163013: Add method in WebView to notify about accept languages change. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« 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 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 899
900 IntRect boundingBox = isHTMLHtmlElement(root) 900 IntRect boundingBox = isHTMLHtmlElement(root)
901 ? IntRect(IntPoint(0, 0), root->document().frame()->view()->contentsSize ()) 901 ? IntRect(IntPoint(0, 0), root->document().frame()->view()->contentsSize ())
902 : root->pixelSnappedBoundingBox(); 902 : root->pixelSnappedBoundingBox();
903 903
904 boundingBox = root->document().frame()->view()->contentsToWindow(boundingBox ); 904 boundingBox = root->document().frame()->view()->contentsToWindow(boundingBox );
905 boundingBox.scale(pageScaleFactor()); 905 boundingBox.scale(pageScaleFactor());
906 bounds = boundingBox; 906 bounds = boundingBox;
907 } 907 }
908 908
909 void WebViewImpl::acceptLanguagesChanged()
910 {
911 }
912
909 bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event) 913 bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event)
910 { 914 {
911 ASSERT((event.type == WebInputEvent::RawKeyDown) 915 ASSERT((event.type == WebInputEvent::RawKeyDown)
912 || (event.type == WebInputEvent::KeyDown) 916 || (event.type == WebInputEvent::KeyDown)
913 || (event.type == WebInputEvent::KeyUp)); 917 || (event.type == WebInputEvent::KeyUp));
914 918
915 // Halt an in-progress fling on a key event. 919 // Halt an in-progress fling on a key event.
916 endActiveFlingAnimation(); 920 endActiveFlingAnimation();
917 921
918 // Please refer to the comments explaining the m_suppressNextKeypressEvent 922 // Please refer to the comments explaining the m_suppressNextKeypressEvent
(...skipping 3156 matching lines...) Expand 10 before | Expand all | Expand 10 after
4075 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4079 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4076 4080
4077 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4081 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4078 return false; 4082 return false;
4079 4083
4080 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4084 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4081 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4085 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4082 } 4086 }
4083 4087
4084 } // namespace blink 4088 } // 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