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

Unified Diff: chrome/browser/extensions/extension_view_host.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/extensions/extension_view_host.cc
diff --git a/chrome/browser/extensions/extension_view_host.cc b/chrome/browser/extensions/extension_view_host.cc
index 301611e5700eb941ea65f8df3368f94d5a1e4e93..5b5d9d4e47da9c99a83769f2a12b7ea617bc5afe 100644
--- a/chrome/browser/extensions/extension_view_host.cc
+++ b/chrome/browser/extensions/extension_view_host.cc
@@ -178,7 +178,7 @@ bool ExtensionViewHost::PreHandleKeyboardEvent(
const NativeWebKeyboardEvent& event,
bool* is_keyboard_shortcut) {
if (extension_host_type() == VIEW_TYPE_EXTENSION_POPUP &&
- event.type == NativeWebKeyboardEvent::RawKeyDown &&
+ event.type() == NativeWebKeyboardEvent::RawKeyDown &&
event.windowsKeyCode == ui::VKEY_ESCAPE) {
DCHECK(is_keyboard_shortcut != NULL);
*is_keyboard_shortcut = true;
@@ -198,7 +198,7 @@ void ExtensionViewHost::HandleKeyboardEvent(
WebContents* source,
const NativeWebKeyboardEvent& event) {
if (extension_host_type() == VIEW_TYPE_EXTENSION_POPUP) {
- if (event.type == NativeWebKeyboardEvent::RawKeyDown &&
+ if (event.type() == NativeWebKeyboardEvent::RawKeyDown &&
event.windowsKeyCode == ui::VKEY_ESCAPE) {
Close();
return;
@@ -211,9 +211,9 @@ bool ExtensionViewHost::PreHandleGestureEvent(
content::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;
}
content::ColorChooser* ExtensionViewHost::OpenColorChooser(
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | chrome/browser/page_load_metrics/metrics_web_contents_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698