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

Side by Side Diff: blimp/engine/session/tab.cc

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits Created 3 years, 11 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
« no previous file with comments | « blimp/client/core/input/blimp_input_manager.cc ('k') | blimp/net/input_message_generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "blimp/engine/session/tab.h" 5 #include "blimp/engine/session/tab.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "blimp/common/create_blimp_message.h" 9 #include "blimp/common/create_blimp_message.h"
10 #include "blimp/common/proto/blimp_message.pb.h" 10 #include "blimp/common/proto/blimp_message.pb.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 navigation_message->set_type(NavigationMessage::NAVIGATION_STATE_CHANGED); 160 navigation_message->set_type(NavigationMessage::NAVIGATION_STATE_CHANGED);
161 navigation_message->mutable_navigation_state_changed() 161 navigation_message->mutable_navigation_state_changed()
162 ->set_page_load_completed(load_status == PageLoadStatus::LOADED); 162 ->set_page_load_completed(load_status == PageLoadStatus::LOADED);
163 163
164 navigation_message_sender_->ProcessMessage(std::move(message), 164 navigation_message_sender_->ProcessMessage(std::move(message),
165 net::CompletionCallback()); 165 net::CompletionCallback());
166 } 166 }
167 167
168 void Tab::OnWebGestureEvent(content::RenderWidgetHost* render_widget_host, 168 void Tab::OnWebGestureEvent(content::RenderWidgetHost* render_widget_host,
169 std::unique_ptr<blink::WebGestureEvent> event) { 169 std::unique_ptr<blink::WebGestureEvent> event) {
170 TRACE_EVENT1("blimp", "Tab::OnWebGestureEvent", "type", event->type); 170 TRACE_EVENT1("blimp", "Tab::OnWebGestureEvent", "type", event->type());
171 render_widget_host->ForwardGestureEvent(*event); 171 render_widget_host->ForwardGestureEvent(*event);
172 } 172 }
173 173
174 void Tab::ShowTextInputUI() { 174 void Tab::ShowTextInputUI() {
175 current_form_request_id_++; 175 current_form_request_id_++;
176 content::FormFieldDataCallback callback = 176 content::FormFieldDataCallback callback =
177 base::Bind(&Tab::ProcessTextInputInfo, weak_factory_.GetWeakPtr(), 177 base::Bind(&Tab::ProcessTextInputInfo, weak_factory_.GetWeakPtr(),
178 current_form_request_id_); 178 current_form_request_id_);
179 179
180 content::RenderFrameHost* focused_frame = web_contents()->GetFocusedFrame(); 180 content::RenderFrameHost* focused_frame = web_contents()->GetFocusedFrame();
(...skipping 28 matching lines...) Expand all
209 void Tab::OnCompositorMessageReceived( 209 void Tab::OnCompositorMessageReceived(
210 content::RenderWidgetHost* render_widget_host, 210 content::RenderWidgetHost* render_widget_host,
211 const std::vector<uint8_t>& message) { 211 const std::vector<uint8_t>& message) {
212 TRACE_EVENT0("blimp", "Tab::OnCompositorMessageReceived"); 212 TRACE_EVENT0("blimp", "Tab::OnCompositorMessageReceived");
213 213
214 render_widget_host->HandleCompositorProto(message); 214 render_widget_host->HandleCompositorProto(message);
215 } 215 }
216 216
217 } // namespace engine 217 } // namespace engine
218 } // namespace blimp 218 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/core/input/blimp_input_manager.cc ('k') | blimp/net/input_message_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698