| OLD | NEW |
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. |update_event| (if non-null) is set to indicate | 62 // to the renderer instead. |update_event| (if non-null) is set to indicate |
| 63 // whether ui::KeyEvent::SetHandled() should be called on the underlying | 63 // whether ui::KeyEvent::SetHandled() should be called on the underlying |
| 64 // ui::KeyEvent. | 64 // ui::KeyEvent. |
| 65 virtual void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event, | 65 virtual void ForwardKeyboardEventWithLatencyInfo( |
| 66 bool* update_event) = 0; | 66 const NativeWebKeyboardEvent& event, |
| 67 const ui::LatencyInfo& latency, |
| 68 bool* update_event) = 0; |
| 67 // Returns whether the widget needs to grab mouse capture to work properly. | 69 // Returns whether the widget needs to grab mouse capture to work properly. |
| 68 virtual bool NeedsMouseCapture() = 0; | 70 virtual bool NeedsMouseCapture() = 0; |
| 69 virtual void SetTooltipsEnabled(bool enable) = 0; | 71 virtual void SetTooltipsEnabled(bool enable) = 0; |
| 70 virtual void ShowContextMenu(const ContextMenuParams& params) = 0; | 72 virtual void ShowContextMenu(const ContextMenuParams& params) = 0; |
| 71 // Sends shutdown request. | 73 // Sends shutdown request. |
| 72 virtual void Shutdown() = 0; | 74 virtual void Shutdown() = 0; |
| 73 | 75 |
| 74 ui::TouchSelectionController* selection_controller() const { | 76 ui::TouchSelectionController* selection_controller() const { |
| 75 return selection_controller_.get(); | 77 return selection_controller_.get(); |
| 76 } | 78 } |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 ui::EventHandler* popup_child_event_handler_; | 248 ui::EventHandler* popup_child_event_handler_; |
| 247 Delegate* const delegate_; | 249 Delegate* const delegate_; |
| 248 aura::Window* window_; | 250 aura::Window* window_; |
| 249 | 251 |
| 250 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewEventHandler); | 252 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewEventHandler); |
| 251 }; | 253 }; |
| 252 | 254 |
| 253 } // namespace content | 255 } // namespace content |
| 254 | 256 |
| 255 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H
_ | 257 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H
_ |
| OLD | NEW |