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

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

Issue 23416003: Add content::RenderWidgetHost::MouseEventCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 const gfx::Size& desired_size) OVERRIDE; 168 const gfx::Size& desired_size) OVERRIDE;
169 virtual void Replace(const string16& word) OVERRIDE; 169 virtual void Replace(const string16& word) OVERRIDE;
170 virtual void ReplaceMisspelling(const string16& word) OVERRIDE; 170 virtual void ReplaceMisspelling(const string16& word) OVERRIDE;
171 virtual void ResizeRectChanged(const gfx::Rect& new_rect) OVERRIDE; 171 virtual void ResizeRectChanged(const gfx::Rect& new_rect) OVERRIDE;
172 virtual void RestartHangMonitorTimeout() OVERRIDE; 172 virtual void RestartHangMonitorTimeout() OVERRIDE;
173 virtual void SetIgnoreInputEvents(bool ignore_input_events) OVERRIDE; 173 virtual void SetIgnoreInputEvents(bool ignore_input_events) OVERRIDE;
174 virtual void Stop() OVERRIDE; 174 virtual void Stop() OVERRIDE;
175 virtual void WasResized() OVERRIDE; 175 virtual void WasResized() OVERRIDE;
176 virtual void AddKeyboardListener(KeyboardListener* listener) OVERRIDE; 176 virtual void AddKeyboardListener(KeyboardListener* listener) OVERRIDE;
177 virtual void RemoveKeyboardListener(KeyboardListener* listener) OVERRIDE; 177 virtual void RemoveKeyboardListener(KeyboardListener* listener) OVERRIDE;
178 virtual void AddMouseListener(MouseListener* listener) OVERRIDE;
179 virtual void RemoveMouseListener(MouseListener* listener) OVERRIDE;
178 virtual void GetWebScreenInfo(WebKit::WebScreenInfo* result) OVERRIDE; 180 virtual void GetWebScreenInfo(WebKit::WebScreenInfo* result) OVERRIDE;
179 virtual void GetSnapshotFromRenderer( 181 virtual void GetSnapshotFromRenderer(
180 const gfx::Rect& src_subrect, 182 const gfx::Rect& src_subrect,
181 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE; 183 const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE;
182 184
183 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const; 185 const NativeWebKeyboardEvent* GetLastKeyboardEvent() const;
184 186
185 // Notification that the screen info has changed. 187 // Notification that the screen info has changed.
186 void NotifyScreenInfoChanged(); 188 void NotifyScreenInfoChanged();
187 189
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 // |dib| and its corresponding location |bitmap_rect| in the backing store 700 // |dib| and its corresponding location |bitmap_rect| in the backing store
699 // is the newly painted pixels by the renderer. 701 // is the newly painted pixels by the renderer.
700 void ScrollBackingStoreRect(const gfx::Vector2d& delta, 702 void ScrollBackingStoreRect(const gfx::Vector2d& delta,
701 const gfx::Rect& clip_rect, 703 const gfx::Rect& clip_rect,
702 const gfx::Size& view_size); 704 const gfx::Size& view_size);
703 705
704 // Give key press listeners a chance to handle this key press. This allow 706 // Give key press listeners a chance to handle this key press. This allow
705 // widgets that don't have focus to still handle key presses. 707 // widgets that don't have focus to still handle key presses.
706 bool KeyPressListenersHandleEvent(const NativeWebKeyboardEvent& event); 708 bool KeyPressListenersHandleEvent(const NativeWebKeyboardEvent& event);
707 709
710 // Give mouse listeners a chance to handle this mouse event.
711 bool MouseListenersHandleEvent(const WebKit::WebMouseEvent& event);
712
708 // InputRouterClient 713 // InputRouterClient
709 virtual InputEventAckState FilterInputEvent( 714 virtual InputEventAckState FilterInputEvent(
710 const WebKit::WebInputEvent& event, 715 const WebKit::WebInputEvent& event,
711 const ui::LatencyInfo& latency_info) OVERRIDE; 716 const ui::LatencyInfo& latency_info) OVERRIDE;
712 virtual void IncrementInFlightEventCount() OVERRIDE; 717 virtual void IncrementInFlightEventCount() OVERRIDE;
713 virtual void DecrementInFlightEventCount() OVERRIDE; 718 virtual void DecrementInFlightEventCount() OVERRIDE;
714 virtual void OnHasTouchEventHandlers(bool has_handlers) OVERRIDE; 719 virtual void OnHasTouchEventHandlers(bool has_handlers) OVERRIDE;
715 virtual bool OnSendKeyboardEvent( 720 virtual bool OnSendKeyboardEvent(
716 const NativeWebKeyboardEvent& key_event, 721 const NativeWebKeyboardEvent& key_event,
717 const ui::LatencyInfo& latency_info, 722 const ui::LatencyInfo& latency_info,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 822
818 bool waiting_for_screen_rects_ack_; 823 bool waiting_for_screen_rects_ack_;
819 gfx::Rect last_view_screen_rect_; 824 gfx::Rect last_view_screen_rect_;
820 gfx::Rect last_window_screen_rect_; 825 gfx::Rect last_window_screen_rect_;
821 826
822 AccessibilityMode accessibility_mode_; 827 AccessibilityMode accessibility_mode_;
823 828
824 // Keyboard event listeners. 829 // Keyboard event listeners.
825 ObserverList<KeyboardListener> keyboard_listeners_; 830 ObserverList<KeyboardListener> keyboard_listeners_;
826 831
832 // Mouse event listeners.
833 ObserverList<MouseListener> mouse_listeners_;
834
827 // If true, then we should repaint when restoring even if we have a 835 // If true, then we should repaint when restoring even if we have a
828 // backingstore. This flag is set to true if we receive a paint message 836 // backingstore. This flag is set to true if we receive a paint message
829 // while is_hidden_ to true. Even though we tell the render widget to hide 837 // while is_hidden_ to true. Even though we tell the render widget to hide
830 // itself, a paint message could already be in flight at that point. 838 // itself, a paint message could already be in flight at that point.
831 bool needs_repainting_on_restore_; 839 bool needs_repainting_on_restore_;
832 840
833 // This is true if the renderer is currently unresponsive. 841 // This is true if the renderer is currently unresponsive.
834 bool is_unresponsive_; 842 bool is_unresponsive_;
835 843
836 // The following value indicates a time in the future when we would consider 844 // The following value indicates a time in the future when we would consider
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 int64 last_input_number_; 925 int64 last_input_number_;
918 926
919 BrowserRenderingStats rendering_stats_; 927 BrowserRenderingStats rendering_stats_;
920 928
921 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 929 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
922 }; 930 };
923 931
924 } // namespace content 932 } // namespace content
925 933
926 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 934 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | content/public/browser/mouse_listener.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698