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

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

Issue 2791753003: Split WebTextCheckClient off WebSpellCheckClient (Closed)
Patch Set: Add TODOs for class renaming Created 3 years, 8 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 WebPrerendererClient* prerendererClient) { 322 WebPrerendererClient* prerendererClient) {
323 DCHECK(m_page); 323 DCHECK(m_page);
324 providePrerendererClientTo( 324 providePrerendererClientTo(
325 *m_page, new PrerendererClientImpl(*m_page, prerendererClient)); 325 *m_page, new PrerendererClientImpl(*m_page, prerendererClient));
326 } 326 }
327 327
328 void WebViewImpl::setSpellCheckClient(WebSpellCheckClient* spellCheckClient) { 328 void WebViewImpl::setSpellCheckClient(WebSpellCheckClient* spellCheckClient) {
329 m_spellCheckClient = spellCheckClient; 329 m_spellCheckClient = spellCheckClient;
330 } 330 }
331 331
332 void WebViewImpl::setTextCheckClient(WebTextCheckClient* textCheckClient) {
333 m_textCheckClient = textCheckClient;
334 }
335
332 // static 336 // static
333 HashSet<WebViewImpl*>& WebViewImpl::allInstances() { 337 HashSet<WebViewImpl*>& WebViewImpl::allInstances() {
334 DEFINE_STATIC_LOCAL(HashSet<WebViewImpl*>, allInstances, ()); 338 DEFINE_STATIC_LOCAL(HashSet<WebViewImpl*>, allInstances, ());
335 return allInstances; 339 return allInstances;
336 } 340 }
337 341
338 WebViewImpl::WebViewImpl(WebViewClient* client, 342 WebViewImpl::WebViewImpl(WebViewClient* client,
339 WebPageVisibilityState visibilityState) 343 WebPageVisibilityState visibilityState)
340 : m_client(client), 344 : m_client(client),
341 m_spellCheckClient(nullptr), 345 m_spellCheckClient(nullptr),
346 m_textCheckClient(nullptr),
342 m_chromeClientImpl(ChromeClientImpl::create(this)), 347 m_chromeClientImpl(ChromeClientImpl::create(this)),
343 m_contextMenuClientImpl(this), 348 m_contextMenuClientImpl(this),
344 m_editorClientImpl(this), 349 m_editorClientImpl(this),
345 m_textCheckerClientImpl(this), 350 m_textCheckerClientImpl(this),
346 m_spellCheckerClientImpl(this, &m_textCheckerClientImpl), 351 m_spellCheckerClientImpl(this, &m_textCheckerClientImpl),
347 m_storageClientImpl(this), 352 m_storageClientImpl(this),
348 m_shouldAutoResize(false), 353 m_shouldAutoResize(false),
349 m_zoomLevel(0), 354 m_zoomLevel(0),
350 m_minimumZoomLevel(zoomFactorToZoomLevel(minTextSizeMultiplier)), 355 m_minimumZoomLevel(zoomFactorToZoomLevel(minTextSizeMultiplier)),
351 m_maximumZoomLevel(zoomFactorToZoomLevel(maxTextSizeMultiplier)), 356 m_maximumZoomLevel(zoomFactorToZoomLevel(maxTextSizeMultiplier)),
(...skipping 3874 matching lines...) Expand 10 before | Expand all | Expand 10 after
4226 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4231 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4227 return nullptr; 4232 return nullptr;
4228 return focusedFrame; 4233 return focusedFrame;
4229 } 4234 }
4230 4235
4231 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4236 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4232 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4237 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4233 } 4238 }
4234 4239
4235 } // namespace blink 4240 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698