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

Side by Side Diff: webkit/glue/editor_client_impl.cc

Issue 200054: Hook up WebFrameClient, replacing many WebViewDelegate methods.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/dom_serializer_unittest.cc ('k') | webkit/glue/empty_webframeclient.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 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The Mac interface forwards most of these commands to the application layer, 5 // The Mac interface forwards most of these commands to the application layer,
6 // and I'm not really sure what to do about most of them. 6 // and I'm not really sure what to do about most of them.
7 7
8 #include "config.h" 8 #include "config.h"
9 9
10 #include "Document.h" 10 #include "Document.h"
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 // Notification that focus was lost. Be careful with this, it's also sent 651 // Notification that focus was lost. Be careful with this, it's also sent
652 // when the page is being closed. 652 // when the page is being closed.
653 653
654 // Cancel any pending DoAutofill call. 654 // Cancel any pending DoAutofill call.
655 autofill_args_.clear(); 655 autofill_args_.clear();
656 autofill_timer_.stop(); 656 autofill_timer_.stop();
657 657
658 // Hide any showing popup. 658 // Hide any showing popup.
659 web_view_->HideAutoCompletePopup(); 659 web_view_->HideAutoCompletePopup();
660 660
661 if (!editing_client_)
662 return; // The page is getting closed, don't fill the password.
663
661 // Notify any password-listener of the focus change. 664 // Notify any password-listener of the focus change.
662 WebCore::HTMLInputElement* input_element = 665 WebCore::HTMLInputElement* input_element =
663 webkit_glue::ElementToHTMLInputElement(element); 666 webkit_glue::ElementToHTMLInputElement(element);
664 if (!input_element) 667 if (!input_element)
665 return; 668 return;
666 669
667 WebFrameImpl* webframe = 670 WebFrameImpl* webframe =
668 WebFrameImpl::FromFrame(input_element->document()->frame()); 671 WebFrameImpl::FromFrame(input_element->document()->frame());
669 if (webframe->GetWebViewImpl() && !webframe->GetWebViewImpl()->GetDelegate())
670 return; // The page is getting closed, don't fill the password.
671
672 webkit_glue::PasswordAutocompleteListener* listener = 672 webkit_glue::PasswordAutocompleteListener* listener =
673 webframe->GetPasswordListener(input_element); 673 webframe->GetPasswordListener(input_element);
674 if (!listener) 674 if (!listener)
675 return; 675 return;
676 676
677 std::wstring value = 677 std::wstring value =
678 webkit_glue::StringToStdWString(input_element->value()); 678 webkit_glue::StringToStdWString(input_element->value());
679 listener->OnBlur(input_element, value); 679 listener->OnBlur(input_element, value);
680 } 680 }
681 681
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 901
902 void EditorClientImpl::getGuessesForWord(const WebCore::String&, 902 void EditorClientImpl::getGuessesForWord(const WebCore::String&,
903 WTF::Vector<WebCore::String>& guesses) { 903 WTF::Vector<WebCore::String>& guesses) {
904 NOTIMPLEMENTED(); 904 NOTIMPLEMENTED();
905 } 905 }
906 906
907 void EditorClientImpl::setInputMethodState(bool enabled) { 907 void EditorClientImpl::setInputMethodState(bool enabled) {
908 if (editing_client_) 908 if (editing_client_)
909 editing_client_->setInputMethodEnabled(enabled); 909 editing_client_->setInputMethodEnabled(enabled);
910 } 910 }
OLDNEW
« no previous file with comments | « webkit/glue/dom_serializer_unittest.cc ('k') | webkit/glue/empty_webframeclient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698