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

Unified Diff: content/browser/frame_host/input/legacy_ipc_frame_input_handler.h

Issue 2884243003: Add a mojo channel for frame messages. (Closed)
Patch Set: Fix presubmit warning I ignored 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: content/browser/frame_host/input/legacy_ipc_frame_input_handler.h
diff --git a/content/browser/frame_host/input/legacy_ipc_frame_input_handler.h b/content/browser/frame_host/input/legacy_ipc_frame_input_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..46436e0d470a8030fede98b807c098df1b6d9a6b
--- /dev/null
+++ b/content/browser/frame_host/input/legacy_ipc_frame_input_handler.h
@@ -0,0 +1,62 @@
+// 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 CONTENT_BROWSER_FRAME_HOST_INPUT_LEGACY_IPC_FRAME_INPUT_HANDLER_H_
+#define CONTENT_BROWSER_FRAME_HOST_INPUT_LEGACY_IPC_FRAME_INPUT_HANDLER_H_
+
+#include "content/browser/frame_host/render_frame_host_impl.h"
+#include "content/browser/renderer_host/input/input_router_impl.h"
+#include "content/common/input/input_handler.mojom.h"
+
+namespace content {
+
+// An instance of a mojom::FrameInputHandler based on chrome IPC.
+// This class is a temporary class to allow the input messages to
+// remain as Chrome IPC messages but progressively work at moving
+// them to mojo.
+class CONTENT_EXPORT LegacyIPCFrameInputHandler
+ : public mojom::FrameInputHandler {
+ public:
+ LegacyIPCFrameInputHandler(RenderFrameHostImpl* frame_host, int routing_id);
+ ~LegacyIPCFrameInputHandler() override;
+
+ void SetCompositionFromExistingText(
+ int32_t start,
+ int32_t end,
+ const std::vector<ui::CompositionUnderline>& underlines) override;
+ void ExtendSelectionAndDelete(int32_t before, int32_t after) override;
+ void DeleteSurroundingText(int32_t before, int32_t after) override;
+ void DeleteSurroundingTextInCodePoints(int32_t before,
+ int32_t after) override;
+ void SetEditableSelectionOffsets(int32_t start, int32_t end) override;
+ void ExecuteEditCommand(const std::string& command,
+ const base::Optional<base::string16>& value) override;
+ void Undo() override;
+ void Redo() override;
+ void Cut() override;
+ void Copy() override;
+ void CopyToFindPboard() override;
+ void Paste() override;
+ void PasteAndMatchStyle() override;
+ void Replace(const base::string16& word) override;
+ void ReplaceMisspelling(const base::string16& word) override;
+ void Delete() override;
+ void SelectAll() override;
+ void CollapseSelection() override;
+ void SelectRange(const gfx::Point& base, const gfx::Point& extent) override;
+ void AdjustSelectionByCharacterOffset(int32_t start, int32_t end) override;
+ void MoveRangeSelectionExtent(const gfx::Point& extent) override;
+
+ private:
+ void SendInput(std::unique_ptr<IPC::Message> message);
+
+ RenderFrameHostImpl* frame_host_;
+ int routing_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(LegacyIPCFrameInputHandler);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_FRAME_HOST_INPUT_LEGACY_IPC_FRAME_INPUT_HANDLER_H_
« no previous file with comments | « content/browser/frame_host/input/OWNERS ('k') | content/browser/frame_host/input/legacy_ipc_frame_input_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698