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 class SpellCheckPanel | |
| 15 : public content::RenderViewObserver, | |
| 16 public content::RenderViewObserverTracker<SpellCheckPanel>, | |
| 17 public blink::WebSpellCheckClient { | |
| 18 public: | |
| 19 SpellCheckPanel(content::RenderView* render_view); | |
|
please use gerrit instead
2017/04/05 15:17:40
explicit.
Xiaocheng
2017/04/05 18:13:32
Done.
| |
| 20 ~SpellCheckPanel() override; | |
| 21 | |
| 22 // RenderViewObserver implementation. | |
| 23 bool OnMessageReceived(const IPC::Message& message) override; | |
| 24 | |
| 25 private: | |
| 26 // RenderViewObserver implementation. | |
| 27 void OnDestruct() override; | |
| 28 | |
| 29 // blink::WebSpellCheckClient implementation. | |
| 30 void showSpellingUI(bool show) override; | |
| 31 bool isShowingSpellingUI() override; | |
| 32 void updateSpellingUIWithMisspelledWord( | |
| 33 const blink::WebString& word) override; | |
| 34 | |
| 35 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) | |
| 36 void OnAdvanceToNextMisspelling(); | |
| 37 void OnToggleSpellPanel(bool is_currently_visible); | |
| 38 #endif | |
|
please use gerrit instead
2017/04/05 15:17:40
Only Mac has a "spelling UI". USE_BROWSER_SPELLCHE
Xiaocheng
2017/04/05 18:13:32
In order not to break anything, I'm not going to i
| |
| 39 | |
| 40 // True if the browser is showing the spelling panel for us. | |
| 41 bool spelling_panel_visible_; | |
| 42 | |
| 43 DISALLOW_COPY_AND_ASSIGN(SpellCheckPanel); | |
| 44 }; | |
| 45 | |
| 46 #endif | |
| OLD | NEW |