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

Side by Side Diff: third_party/WebKit/Source/web/SpellCheckerClientImpl.cpp

Issue 2848513002: Introduce the abstract class WebViewBase, to decouple WebViewImpl. (Closed)
Patch Set: Fix typo. Created 3 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) 2006, 2007 Apple, Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved.
3 * Copyright (C) 2012 Google, Inc. All rights reserved. 3 * Copyright (C) 2012 Google, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 11 matching lines...) Expand all
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #include "web/SpellCheckerClientImpl.h" 27 #include "web/SpellCheckerClientImpl.h"
28 28
29 #include "core/dom/Element.h" 29 #include "core/dom/Element.h"
30 #include "core/editing/markers/DocumentMarkerController.h" 30 #include "core/editing/markers/DocumentMarkerController.h"
31 #include "core/editing/spellcheck/SpellChecker.h" 31 #include "core/editing/spellcheck/SpellChecker.h"
32 #include "core/exported/WebViewBase.h"
32 #include "core/frame/LocalFrame.h" 33 #include "core/frame/LocalFrame.h"
33 #include "core/page/Page.h" 34 #include "core/page/Page.h"
34 #include "public/web/WebSpellCheckClient.h" 35 #include "public/web/WebSpellCheckClient.h"
35 #include "web/WebViewImpl.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 SpellCheckerClientImpl::SpellCheckerClientImpl(WebViewImpl* webview) 39 SpellCheckerClientImpl::SpellCheckerClientImpl(WebViewBase* webview)
40 : web_view_(webview), 40 : web_view_(webview),
41 spell_check_this_field_status_(kSpellCheckAutomatic) {} 41 spell_check_this_field_status_(kSpellCheckAutomatic) {}
42 42
43 SpellCheckerClientImpl::~SpellCheckerClientImpl() {} 43 SpellCheckerClientImpl::~SpellCheckerClientImpl() {}
44 44
45 bool SpellCheckerClientImpl::ShouldSpellcheckByDefault() { 45 bool SpellCheckerClientImpl::ShouldSpellcheckByDefault() {
46 // Spellcheck should be enabled for all editable areas (such as textareas, 46 // Spellcheck should be enabled for all editable areas (such as textareas,
47 // contentEditable regions, designMode docs and inputs). 47 // contentEditable regions, designMode docs and inputs).
48 if (!web_view_->FocusedCoreFrame()->IsLocalFrame()) 48 if (!web_view_->FocusedCoreFrame()->IsLocalFrame())
49 return false; 49 return false;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 web_view_->SpellCheckClient()->ShowSpellingUI(show); 119 web_view_->SpellCheckClient()->ShowSpellingUI(show);
120 } 120 }
121 121
122 bool SpellCheckerClientImpl::SpellingUIIsShowing() { 122 bool SpellCheckerClientImpl::SpellingUIIsShowing() {
123 if (web_view_->SpellCheckClient()) 123 if (web_view_->SpellCheckClient())
124 return web_view_->SpellCheckClient()->IsShowingSpellingUI(); 124 return web_view_->SpellCheckClient()->IsShowingSpellingUI();
125 return false; 125 return false;
126 } 126 }
127 127
128 } // namespace blink 128 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/SpellCheckerClientImpl.h ('k') | third_party/WebKit/Source/web/StorageClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698