Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PANEL_H | |
| 6 #define COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PANEL_H | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "components/spellcheck/spellcheck_build_features.h" | |
| 10 #include "content/public/renderer/render_view_observer.h" | |
| 11 #include "content/public/renderer/render_view_observer_tracker.h" | |
| 12 #include "third_party/WebKit/public/web/WebSpellCheckClient.h" | |
| 13 | |
| 14 // TODO(xiaochengh): Only Mac has spelling panel. Remove the #if checks in this | |
| 15 // class, which seem unnecessary, and make sure that this class is compiled and | |
| 16 // used only on Mac. | |
|
groby-ooo-7-16
2017/04/05 21:19:54
Ah, I see there's a TODO - I assume this will be i
Xiaocheng
2017/04/05 22:17:48
Should be, after fixing this bug :)
| |
| 17 class SpellCheckPanel | |
| 18 : public content::RenderViewObserver, | |
| 19 public content::RenderViewObserverTracker<SpellCheckPanel>, | |
| 20 public blink::WebSpellCheckClient { | |
| 21 public: | |
| 22 explicit SpellCheckPanel(content::RenderView* render_view); | |
| 23 ~SpellCheckPanel() override; | |
| 24 | |
| 25 // RenderViewObserver implementation. | |
| 26 bool OnMessageReceived(const IPC::Message& message) override; | |
| 27 | |
| 28 private: | |
| 29 // RenderViewObserver implementation. | |
| 30 void OnDestruct() override; | |
| 31 | |
| 32 // blink::WebSpellCheckClient implementation. | |
| 33 void showSpellingUI(bool show) override; | |
| 34 bool isShowingSpellingUI() override; | |
| 35 void updateSpellingUIWithMisspelledWord( | |
| 36 const blink::WebString& word) override; | |
| 37 | |
| 38 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) | |
| 39 void OnAdvanceToNextMisspelling(); | |
| 40 void OnToggleSpellPanel(bool is_currently_visible); | |
| 41 #endif | |
| 42 | |
| 43 // True if the browser is showing the spelling panel for us. | |
| 44 bool spelling_panel_visible_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(SpellCheckPanel); | |
| 47 }; | |
| 48 | |
| 49 #endif | |
| OLD | NEW |