| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include "web/TextCheckerClientImpl.h" | 5 #include "web/TextCheckerClientImpl.h" |
| 6 #include "core/exported/WebViewBase.h" | 6 #include "core/exported/WebViewBase.h" |
| 7 #include "core/frame/WebLocalFrameBase.h" |
| 7 #include "public/web/WebTextCheckClient.h" | 8 #include "public/web/WebTextCheckClient.h" |
| 8 #include "public/web/WebTextCheckingResult.h" | 9 #include "public/web/WebTextCheckingResult.h" |
| 9 #include "web/WebLocalFrameImpl.h" | |
| 10 #include "web/WebTextCheckingCompletionImpl.h" | 10 #include "web/WebTextCheckingCompletionImpl.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 TextCheckerClientImpl::TextCheckerClientImpl(WebLocalFrameImpl* web_local_frame) | 14 TextCheckerClientImpl::TextCheckerClientImpl(WebLocalFrameBase* web_local_frame) |
| 15 : web_local_frame_(web_local_frame) {} | 15 : web_local_frame_(web_local_frame) {} |
| 16 | 16 |
| 17 DEFINE_TRACE(TextCheckerClientImpl) { | 17 DEFINE_TRACE(TextCheckerClientImpl) { |
| 18 visitor->Trace(web_local_frame_); | 18 visitor->Trace(web_local_frame_); |
| 19 } | 19 } |
| 20 | 20 |
| 21 WebTextCheckClient* TextCheckerClientImpl::GetWebTextCheckClient() const { | 21 WebTextCheckClient* TextCheckerClientImpl::GetWebTextCheckClient() const { |
| 22 return web_local_frame_->TextCheckClient(); | 22 return web_local_frame_->TextCheckClient(); |
| 23 } | 23 } |
| 24 | 24 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 text, new WebTextCheckingCompletionImpl(request)); | 56 text, new WebTextCheckingCompletionImpl(request)); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void TextCheckerClientImpl::CancelAllPendingRequests() { | 59 void TextCheckerClientImpl::CancelAllPendingRequests() { |
| 60 if (!GetWebTextCheckClient()) | 60 if (!GetWebTextCheckClient()) |
| 61 return; | 61 return; |
| 62 GetWebTextCheckClient()->CancelAllPendingRequests(); | 62 GetWebTextCheckClient()->CancelAllPendingRequests(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 } // namespace blink | 65 } // namespace blink |
| OLD | NEW |