Chromium Code Reviews| Index: components/spellcheck/renderer/spellcheck_panel.h |
| diff --git a/components/spellcheck/renderer/spellcheck_panel.h b/components/spellcheck/renderer/spellcheck_panel.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..70825e8fba5f37b293f9deb85445ac01183c32ff |
| --- /dev/null |
| +++ b/components/spellcheck/renderer/spellcheck_panel.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PANEL_H |
| +#define COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PANEL_H |
| + |
| +#include "base/macros.h" |
| +#include "components/spellcheck/spellcheck_build_features.h" |
| +#include "content/public/renderer/render_view_observer.h" |
| +#include "content/public/renderer/render_view_observer_tracker.h" |
| +#include "third_party/WebKit/public/web/WebSpellCheckClient.h" |
| + |
| +class SpellCheckPanel |
| + : public content::RenderViewObserver, |
| + public content::RenderViewObserverTracker<SpellCheckPanel>, |
| + public blink::WebSpellCheckClient { |
| + public: |
| + SpellCheckPanel(content::RenderView* render_view); |
|
please use gerrit instead
2017/04/05 15:17:40
explicit.
Xiaocheng
2017/04/05 18:13:32
Done.
|
| + ~SpellCheckPanel() override; |
| + |
| + // RenderViewObserver implementation. |
| + bool OnMessageReceived(const IPC::Message& message) override; |
| + |
| + private: |
| + // RenderViewObserver implementation. |
| + void OnDestruct() override; |
| + |
| + // blink::WebSpellCheckClient implementation. |
| + void showSpellingUI(bool show) override; |
| + bool isShowingSpellingUI() override; |
| + void updateSpellingUIWithMisspelledWord( |
| + const blink::WebString& word) override; |
| + |
| +#if BUILDFLAG(USE_BROWSER_SPELLCHECKER) |
| + void OnAdvanceToNextMisspelling(); |
| + void OnToggleSpellPanel(bool is_currently_visible); |
| +#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
|
| + |
| + // True if the browser is showing the spelling panel for us. |
| + bool spelling_panel_visible_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SpellCheckPanel); |
| +}; |
| + |
| +#endif |