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

Side by Side Diff: content/browser/frame_host/input/legacy_ipc_frame_input_handler.cc

Issue 2951053005: Add Mojo API for Blink hit testing (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/input/legacy_ipc_frame_input_handler.h" 5 #include "content/browser/frame_host/input/legacy_ipc_frame_input_handler.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/browser/renderer_host/input/legacy_input_router_impl.h" 8 #include "content/browser/renderer_host/input/legacy_input_router_impl.h"
9 #include "content/browser/renderer_host/render_widget_host_impl.h" 9 #include "content/browser/renderer_host/render_widget_host_impl.h"
10 #include "content/common/input_messages.h" 10 #include "content/common/input_messages.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 115
116 void LegacyIPCFrameInputHandler::SelectAll() { 116 void LegacyIPCFrameInputHandler::SelectAll() {
117 SendInput(base::MakeUnique<InputMsg_SelectAll>(routing_id_)); 117 SendInput(base::MakeUnique<InputMsg_SelectAll>(routing_id_));
118 } 118 }
119 119
120 void LegacyIPCFrameInputHandler::CollapseSelection() { 120 void LegacyIPCFrameInputHandler::CollapseSelection() {
121 SendInput(base::MakeUnique<InputMsg_CollapseSelection>(routing_id_)); 121 SendInput(base::MakeUnique<InputMsg_CollapseSelection>(routing_id_));
122 } 122 }
123 123
124 void LegacyIPCFrameInputHandler::HitTestFrameAt(
125 const gfx::PointF& point,
126 HitTestFrameAtCallback callback) {
127 // We do not support this API over old IPC.
rjkroege 2017/06/26 18:29:52 NOTREACHED(); ?
128 }
129
124 void LegacyIPCFrameInputHandler::SelectRange(const gfx::Point& point, 130 void LegacyIPCFrameInputHandler::SelectRange(const gfx::Point& point,
125 const gfx::Point& extent) { 131 const gfx::Point& extent) {
126 SendInput(base::MakeUnique<InputMsg_SelectRange>(routing_id_, point, extent)); 132 SendInput(base::MakeUnique<InputMsg_SelectRange>(routing_id_, point, extent));
127 } 133 }
128 134
129 void LegacyIPCFrameInputHandler::AdjustSelectionByCharacterOffset(int32_t start, 135 void LegacyIPCFrameInputHandler::AdjustSelectionByCharacterOffset(int32_t start,
130 int32_t end) { 136 int32_t end) {
131 SendInput(base::MakeUnique<InputMsg_AdjustSelectionByCharacterOffset>( 137 SendInput(base::MakeUnique<InputMsg_AdjustSelectionByCharacterOffset>(
132 routing_id_, start, end)); 138 routing_id_, start, end));
133 } 139 }
134 140
135 void LegacyIPCFrameInputHandler::MoveRangeSelectionExtent( 141 void LegacyIPCFrameInputHandler::MoveRangeSelectionExtent(
136 const gfx::Point& extent) { 142 const gfx::Point& extent) {
137 SendInput( 143 SendInput(
138 base::MakeUnique<InputMsg_MoveRangeSelectionExtent>(routing_id_, extent)); 144 base::MakeUnique<InputMsg_MoveRangeSelectionExtent>(routing_id_, extent));
139 } 145 }
140 146
141 void LegacyIPCFrameInputHandler::SendInput( 147 void LegacyIPCFrameInputHandler::SendInput(
142 std::unique_ptr<IPC::Message> message) { 148 std::unique_ptr<IPC::Message> message) {
143 static_cast<LegacyInputRouterImpl*>( 149 static_cast<LegacyInputRouterImpl*>(
144 frame_host_->GetRenderWidgetHost()->input_router()) 150 frame_host_->GetRenderWidgetHost()->input_router())
145 ->SendInput(std::move(message)); 151 ->SendInput(std::move(message));
146 } 152 }
147 153
148 } // namespace content 154 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698