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

Unified Diff: chrome/browser/spellchecker/spellcheck_message_filter_platform.h

Issue 2244083002: Componentize spellcheck [4]: spellcheck/browser and android java-side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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: chrome/browser/spellchecker/spellcheck_message_filter_platform.h
diff --git a/chrome/browser/spellchecker/spellcheck_message_filter_platform.h b/chrome/browser/spellchecker/spellcheck_message_filter_platform.h
deleted file mode 100644
index 31fd9994d6ee08054f9ed2d90508e7a34cde2783..0000000000000000000000000000000000000000
--- a/chrome/browser/spellchecker/spellcheck_message_filter_platform.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2012 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 CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_MESSAGE_FILTER_PLATFORM_H_
-#define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_MESSAGE_FILTER_PLATFORM_H_
-
-#include <map>
-
-#include "base/macros.h"
-#include "build/build_config.h"
-#include "chrome/browser/spellchecker/spellcheck_message_filter.h"
-#include "components/spellcheck/common/spellcheck_result.h"
-#include "content/public/browser/browser_message_filter.h"
-
-class SpellCheckerSessionBridge;
-
-// A message filter implementation that receives
-// the platform-specific spell checker requests from SpellCheckProvider.
-class SpellCheckMessageFilterPlatform : public content::BrowserMessageFilter {
- public:
- explicit SpellCheckMessageFilterPlatform(int render_process_id);
-
- // BrowserMessageFilter implementation.
- void OverrideThreadForMessage(const IPC::Message& message,
- content::BrowserThread::ID* thread) override;
- bool OnMessageReceived(const IPC::Message& message) override;
-
- // Adjusts remote_results by examining local_results. Any result that's both
- // local and remote stays type SPELLING, all others are flagged GRAMMAR.
- // (This is needed to force gray underline for remote-only results.)
- static void CombineResults(
- std::vector<SpellCheckResult>* remote_results,
- const std::vector<SpellCheckResult>& local_results);
-
- private:
- friend class TestingSpellCheckMessageFilter;
- friend class SpellcheckMessageFilterPlatformMacTest;
-
- ~SpellCheckMessageFilterPlatform() override;
-
- void OnCheckSpelling(const base::string16& word, int route_id, bool* correct);
- void OnFillSuggestionList(const base::string16& word,
- std::vector<base::string16>* suggestions);
- void OnShowSpellingPanel(bool show);
- void OnUpdateSpellingPanelWithMisspelledWord(const base::string16& word);
- void OnRequestTextCheck(int route_id,
- int identifier,
- const base::string16& text,
- std::vector<SpellCheckMarker> markers);
-
- int ToDocumentTag(int route_id);
- void RetireDocumentTag(int route_id);
- std::map<int,int> tag_map_;
-
- int render_process_id_;
-
-#if defined(OS_ANDROID)
- void OnToggleSpellCheck(bool enabled, bool checked);
-
- // Android-specific object used to query the Android spellchecker.
- std::unique_ptr<SpellCheckerSessionBridge> impl_;
-#endif
-
- // A JSON-RPC client that calls the Spelling service in the background.
- std::unique_ptr<SpellingServiceClient> client_;
-
- DISALLOW_COPY_AND_ASSIGN(SpellCheckMessageFilterPlatform);
-};
-
-#endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_MESSAGE_FILTER_PLATFORM_H_

Powered by Google App Engine
This is Rietveld 408576698