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

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

Issue 2857353002: Convert Spellcheck host MessageFilter IPC to mojo (Closed)
Patch Set: Use MakeUnique for the MessageLoop in TestingSpellCheckProvider. Created 3 years, 7 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.h
diff --git a/chrome/browser/spellchecker/spellcheck_message_filter.h b/chrome/browser/spellchecker/spellcheck_message_filter.h
deleted file mode 100644
index 8f62b1e5bf9baded3c687c71ddec1e47d502f4ea..0000000000000000000000000000000000000000
--- a/chrome/browser/spellchecker/spellcheck_message_filter.h
+++ /dev/null
@@ -1,72 +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_H_
-#define CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_MESSAGE_FILTER_H_
-
-#include <stdint.h>
-
-#include <memory>
-
-#include "base/compiler_specific.h"
-#include "components/spellcheck/browser/spelling_service_client.h"
-#include "components/spellcheck/spellcheck_build_features.h"
-#include "content/public/browser/browser_message_filter.h"
-
-class SpellcheckService;
-struct SpellCheckResult;
-
-// A message filter implementation that receives spell checker requests from
-// SpellCheckProvider.
-class SpellCheckMessageFilter : public content::BrowserMessageFilter {
- public:
- explicit SpellCheckMessageFilter(int render_process_id);
-
- // content::BrowserMessageFilter implementation.
- void OverrideThreadForMessage(const IPC::Message& message,
- content::BrowserThread::ID* thread) override;
- bool OnMessageReceived(const IPC::Message& message) override;
-
- private:
- friend class TestingSpellCheckMessageFilter;
-
- ~SpellCheckMessageFilter() override;
-
- void OnSpellCheckerRequestDictionary();
- void OnNotifyChecked(const base::string16& word, bool misspelled);
-#if !BUILDFLAG(USE_BROWSER_SPELLCHECKER)
- void OnCallSpellingService(int route_id,
- int identifier,
- const base::string16& text);
-
- // A callback function called when the Spelling service finishes checking
- // text. Sends the given results to a renderer.
- void OnTextCheckComplete(
- int route_id,
- int identifier,
- bool success,
- const base::string16& text,
- const std::vector<SpellCheckResult>& results);
-
- // Checks the user profile and sends a JSON-RPC request to the Spelling
- // service if a user enables the "Ask Google for suggestions" option. When we
- // receive a response (including an error) from the service, it calls
- // OnTextCheckComplete. When this function is called before we receive a
- // response for the previous request, this function cancels the previous
- // request and sends a new one.
- void CallSpellingService(const base::string16& text,
- int route_id,
- int identifier);
-#endif
-
- // Can be overridden for testing.
- virtual SpellcheckService* GetSpellcheckService() const;
-
- int render_process_id_;
-
- // A JSON-RPC client that calls the Spelling service in the background.
- std::unique_ptr<SpellingServiceClient> client_;
-};
-
-#endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_MESSAGE_FILTER_H_
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_host_impl_unittest.cc ('k') | chrome/browser/spellchecker/spellcheck_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698