| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Eric Seidel (eric@webkit.org) | 2 * Copyright (C) 2006 Eric Seidel (eric@webkit.org) |
| 3 * Copyright (C) 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 5 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 5 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 DISALLOW_NEW(); | 280 DISALLOW_NEW(); |
| 281 public: | 281 public: |
| 282 ~EmptyTextCheckerClient() { } | 282 ~EmptyTextCheckerClient() { } |
| 283 | 283 |
| 284 void checkSpellingOfString(const String&, int*, int*) override {} | 284 void checkSpellingOfString(const String&, int*, int*) override {} |
| 285 void requestCheckingOfString(TextCheckingRequest*) override; | 285 void requestCheckingOfString(TextCheckingRequest*) override; |
| 286 void cancelAllPendingRequests() override; | 286 void cancelAllPendingRequests() override; |
| 287 }; | 287 }; |
| 288 | 288 |
| 289 class EmptySpellCheckerClient : public SpellCheckerClient { | 289 class EmptySpellCheckerClient : public SpellCheckerClient { |
| 290 WTF_MAKE_NONCOPYABLE(EmptySpellCheckerClient); USING_FAST_MALLOC(EmptySpellC
heckerClient); | 290 WTF_MAKE_NONCOPYABLE(EmptySpellCheckerClient); |
| 291 USING_FAST_MALLOC(EmptySpellCheckerClient); |
| 291 public: | 292 public: |
| 292 EmptySpellCheckerClient() {} | 293 EmptySpellCheckerClient() {} |
| 293 ~EmptySpellCheckerClient() override {} | 294 ~EmptySpellCheckerClient() override {} |
| 294 | 295 |
| 295 bool isSpellCheckingEnabled() override { return false; } | 296 bool isSpellCheckingEnabled() override { return false; } |
| 296 void toggleSpellCheckingEnabled() override {} | 297 void toggleSpellCheckingEnabled() override {} |
| 297 | 298 |
| 298 TextCheckerClient& textChecker() override { return m_textCheckerClient; } | 299 TextCheckerClient& textChecker() override { return m_textCheckerClient; } |
| 299 | 300 |
| 300 void updateSpellingUIWithMisspelledWord(const String&) override {} | 301 void updateSpellingUIWithMisspelledWord(const String&) override {} |
| 301 void showSpellingUI(bool) override {} | 302 void showSpellingUI(bool) override {} |
| 302 bool spellingUIIsShowing() override { return false; } | 303 bool spellingUIIsShowing() override { return false; } |
| 303 | 304 |
| 304 private: | 305 private: |
| 305 EmptyTextCheckerClient m_textCheckerClient; | 306 EmptyTextCheckerClient m_textCheckerClient; |
| 306 }; | 307 }; |
| 307 | 308 |
| 308 class EmptyEditorClient final : public EditorClient { | 309 class EmptyEditorClient final : public EditorClient { |
| 309 WTF_MAKE_NONCOPYABLE(EmptyEditorClient); USING_FAST_MALLOC(EmptyEditorClient
); | 310 WTF_MAKE_NONCOPYABLE(EmptyEditorClient); |
| 311 USING_FAST_MALLOC(EmptyEditorClient); |
| 310 public: | 312 public: |
| 311 EmptyEditorClient() {} | 313 EmptyEditorClient() {} |
| 312 ~EmptyEditorClient() override {} | 314 ~EmptyEditorClient() override {} |
| 313 | 315 |
| 314 void respondToChangedContents() override {} | 316 void respondToChangedContents() override {} |
| 315 void respondToChangedSelection(LocalFrame*, SelectionType) override {} | 317 void respondToChangedSelection(LocalFrame*, SelectionType) override {} |
| 316 | 318 |
| 317 bool canCopyCut(LocalFrame*, bool defaultValue) const override { return defa
ultValue; } | 319 bool canCopyCut(LocalFrame*, bool defaultValue) const override { return defa
ultValue; } |
| 318 bool canPaste(LocalFrame*, bool defaultValue) const override { return defaul
tValue; } | 320 bool canPaste(LocalFrame*, bool defaultValue) const override { return defaul
tValue; } |
| 319 | 321 |
| 320 bool handleKeyboardEvent(LocalFrame*) override { return false; } | 322 bool handleKeyboardEvent(LocalFrame*) override { return false; } |
| 321 }; | 323 }; |
| 322 | 324 |
| 323 class EmptyContextMenuClient final : public ContextMenuClient { | 325 class EmptyContextMenuClient final : public ContextMenuClient { |
| 324 WTF_MAKE_NONCOPYABLE(EmptyContextMenuClient); USING_FAST_MALLOC(EmptyContext
MenuClient); | 326 WTF_MAKE_NONCOPYABLE(EmptyContextMenuClient); |
| 327 USING_FAST_MALLOC(EmptyContextMenuClient); |
| 325 public: | 328 public: |
| 326 EmptyContextMenuClient() {} | 329 EmptyContextMenuClient() {} |
| 327 ~EmptyContextMenuClient() override {} | 330 ~EmptyContextMenuClient() override {} |
| 328 bool showContextMenu(const ContextMenu*, bool) override { return false; } | 331 bool showContextMenu(const ContextMenu*, bool) override { return false; } |
| 329 void clearContextMenu() override {} | 332 void clearContextMenu() override {} |
| 330 }; | 333 }; |
| 331 | 334 |
| 332 CORE_EXPORT void fillWithEmptyClients(Page::PageClients&); | 335 CORE_EXPORT void fillWithEmptyClients(Page::PageClients&); |
| 333 | 336 |
| 334 } // namespace blink | 337 } // namespace blink |
| 335 | 338 |
| 336 #endif // EmptyClients_h | 339 #endif // EmptyClients_h |
| OLD | NEW |