Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(662)

Unified Diff: components/spellcheck/renderer/spellcheck_panel.h

Issue 2818043002: Make SpellCheckPanel compiled and used only on Mac (Closed)
Patch Set: Thu Apr 13 18:29:22 PDT 2017 Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/spellcheck/renderer/spellcheck_panel.h
diff --git a/components/spellcheck/renderer/spellcheck_panel.h b/components/spellcheck/renderer/spellcheck_panel.h
index 87c42f6c82f18fad668fdd6d7030239f8c3b1369..18c9c4e2f15d3f0beb4c9021c916a8a8c0e176a8 100644
--- a/components/spellcheck/renderer/spellcheck_panel.h
+++ b/components/spellcheck/renderer/spellcheck_panel.h
@@ -11,9 +11,10 @@
#include "content/public/renderer/render_view_observer_tracker.h"
#include "third_party/WebKit/public/web/WebSpellCheckClient.h"
-// TODO(xiaochengh): Only Mac has spelling panel. Remove the #if checks in this
-// class, which seem unnecessary, and make sure that this class is compiled and
-// used only on Mac.
+#if !BUILDFLAG(HAS_SPELLCHECK_PANEL)
+#error "This file shouldn't be compiled without spellcheck panel."
+#endif
+
class SpellCheckPanel
: public content::RenderViewObserver,
public content::RenderViewObserverTracker<SpellCheckPanel>,
@@ -35,10 +36,8 @@ class SpellCheckPanel
void UpdateSpellingUIWithMisspelledWord(
const blink::WebString& word) override;
-#if BUILDFLAG(USE_BROWSER_SPELLCHECKER)
void OnAdvanceToNextMisspelling();
void OnToggleSpellPanel(bool is_currently_visible);
-#endif
// True if the browser is showing the spelling panel for us.
bool spelling_panel_visible_;

Powered by Google App Engine
This is Rietveld 408576698