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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_event_handler.h

Issue 2775553002: Adds the ability for WebContentsDelegate to decide if event should be updated (Closed)
Patch Set: Fix compile Created 3 years, 9 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 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 : public ui::EventHandler { 52 : public ui::EventHandler {
53 public: 53 public:
54 // An interface to provide platform specific logic needed for event handling. 54 // An interface to provide platform specific logic needed for event handling.
55 class Delegate { 55 class Delegate {
56 public: 56 public:
57 Delegate(); 57 Delegate();
58 58
59 // Converts |rect| from window coordinate to screen coordinate. 59 // Converts |rect| from window coordinate to screen coordinate.
60 virtual gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const = 0; 60 virtual gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const = 0;
61 // Call keybindings handler against the event and send matched edit commands 61 // Call keybindings handler against the event and send matched edit commands
62 // to the renderer instead. 62 // to the renderer instead. |update_event| (if non-null) is set to indicate
63 virtual void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event) = 0; 63 // whether ui::KeyEvent::SetHandled() should be called on the underlying
64 // ui::KeyEvent.
65 virtual void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event,
66 bool* update_event) = 0;
64 // Returns whether the widget needs to grab mouse capture to work properly. 67 // Returns whether the widget needs to grab mouse capture to work properly.
65 virtual bool NeedsMouseCapture() = 0; 68 virtual bool NeedsMouseCapture() = 0;
66 virtual void SetTooltipsEnabled(bool enable) = 0; 69 virtual void SetTooltipsEnabled(bool enable) = 0;
67 virtual void ShowContextMenu(const ContextMenuParams& params) = 0; 70 virtual void ShowContextMenu(const ContextMenuParams& params) = 0;
68 // Sends shutdown request. 71 // Sends shutdown request.
69 virtual void Shutdown() = 0; 72 virtual void Shutdown() = 0;
70 73
71 ui::TouchSelectionController* selection_controller() const { 74 ui::TouchSelectionController* selection_controller() const {
72 return selection_controller_.get(); 75 return selection_controller_.get();
73 } 76 }
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 ui::EventHandler* popup_child_event_handler_; 246 ui::EventHandler* popup_child_event_handler_;
244 Delegate* const delegate_; 247 Delegate* const delegate_;
245 aura::Window* window_; 248 aura::Window* window_;
246 249
247 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewEventHandler); 250 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewEventHandler);
248 }; 251 };
249 252
250 } // namespace content 253 } // namespace content
251 254
252 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H _ 255 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698