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

Unified Diff: chrome/browser/devtools/devtools_window.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/devtools/devtools_window.cc
diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc
index c63a8e802aee4a7becf654a685bd9cda71501a2c..bb53246b0d22237393b5bff89396d8866c7a929f 100644
--- a/chrome/browser/devtools/devtools_window.cc
+++ b/chrome/browser/devtools/devtools_window.cc
@@ -274,7 +274,7 @@ void DevToolsEventForwarder::SetWhitelistedShortcuts(
bool DevToolsEventForwarder::ForwardEvent(
const content::NativeWebKeyboardEvent& event) {
std::string event_type;
- switch (event.type) {
+ switch (event.type()) {
case WebInputEvent::KeyDown:
case WebInputEvent::RawKeyDown:
event_type = kKeyDownEventName;
@@ -288,10 +288,9 @@ bool DevToolsEventForwarder::ForwardEvent(
int key_code = ui::LocatedToNonLocatedKeyboardCode(
static_cast<ui::KeyboardCode>(event.windowsKeyCode));
- int modifiers = event.modifiers & (WebInputEvent::ShiftKey |
- WebInputEvent::ControlKey |
- WebInputEvent::AltKey |
- WebInputEvent::MetaKey);
+ int modifiers =
+ event.modifiers() & (WebInputEvent::ShiftKey | WebInputEvent::ControlKey |
+ WebInputEvent::AltKey | WebInputEvent::MetaKey);
int key = CombineKeyCodeAndModifiers(key_code, modifiers);
if (whitelisted_keys_.find(key) == whitelisted_keys_.end())
return false;
@@ -1126,9 +1125,9 @@ bool DevToolsWindow::PreHandleGestureEvent(
WebContents* source,
const blink::WebGestureEvent& event) {
// Disable pinch zooming.
- return event.type == blink::WebGestureEvent::GesturePinchBegin ||
- event.type == blink::WebGestureEvent::GesturePinchUpdate ||
- event.type == blink::WebGestureEvent::GesturePinchEnd;
+ return event.type() == blink::WebGestureEvent::GesturePinchBegin ||
+ event.type() == blink::WebGestureEvent::GesturePinchUpdate ||
+ event.type() == blink::WebGestureEvent::GesturePinchEnd;
}
void DevToolsWindow::ShowCertificateViewerInDevTools(
« no previous file with comments | « chrome/browser/chromeos/login/ui/webui_login_view.cc ('k') | chrome/browser/extensions/extension_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698