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

Side by Side Diff: content/renderer/render_widget.h

Issue 2479663002: Move compositor InputHandler from RenderViewImpl to RenderWidget. (Closed)
Patch Set: Rebase to master@{#445291}. 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 unified diff | Download patch
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_RENDERER_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <deque> 11 #include <deque>
12 #include <map> 12 #include <map>
13 #include <memory> 13 #include <memory>
14 #include <queue> 14 #include <queue>
15 #include <string> 15 #include <string>
16 #include <vector> 16 #include <vector>
17 17
18 #include "base/callback.h" 18 #include "base/callback.h"
19 #include "base/compiler_specific.h" 19 #include "base/compiler_specific.h"
20 #include "base/macros.h" 20 #include "base/macros.h"
21 #include "base/memory/ref_counted.h" 21 #include "base/memory/ref_counted.h"
22 #include "base/memory/weak_ptr.h"
22 #include "base/observer_list.h" 23 #include "base/observer_list.h"
23 #include "base/time/time.h" 24 #include "base/time/time.h"
24 #include "build/build_config.h" 25 #include "build/build_config.h"
25 #include "content/common/content_export.h" 26 #include "content/common/content_export.h"
26 #include "content/common/cursors/webcursor.h" 27 #include "content/common/cursors/webcursor.h"
27 #include "content/common/drag_event_source_info.h" 28 #include "content/common/drag_event_source_info.h"
28 #include "content/common/edit_command.h" 29 #include "content/common/edit_command.h"
29 #include "content/common/input/synthetic_gesture_params.h" 30 #include "content/common/input/synthetic_gesture_params.h"
30 #include "content/public/common/drop_data.h" 31 #include "content/public/common/drop_data.h"
31 #include "content/public/common/screen_info.h" 32 #include "content/public/common/screen_info.h"
(...skipping 30 matching lines...) Expand all
62 class GURL; 63 class GURL;
63 64
64 namespace IPC { 65 namespace IPC {
65 class SyncMessageFilter; 66 class SyncMessageFilter;
66 } 67 }
67 68
68 namespace blink { 69 namespace blink {
69 namespace scheduler { 70 namespace scheduler {
70 class RenderWidgetSchedulingState; 71 class RenderWidgetSchedulingState;
71 } 72 }
73 struct WebActiveWheelFlingParameters;
72 struct WebDeviceEmulationParams; 74 struct WebDeviceEmulationParams;
73 class WebDragData; 75 class WebDragData;
74 class WebFrameWidget; 76 class WebFrameWidget;
75 class WebGestureEvent; 77 class WebGestureEvent;
76 class WebImage; 78 class WebImage;
77 class WebInputMethodController; 79 class WebInputMethodController;
78 class WebLocalFrame; 80 class WebLocalFrame;
79 class WebMouseEvent; 81 class WebMouseEvent;
80 class WebNode; 82 class WebNode;
81 struct WebPoint; 83 struct WebPoint;
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 void set_focused_pepper_plugin(PepperPluginInstanceImpl* plugin) { 407 void set_focused_pepper_plugin(PepperPluginInstanceImpl* plugin) {
406 focused_pepper_plugin_ = plugin; 408 focused_pepper_plugin_ = plugin;
407 } 409 }
408 410
409 // When emulated, this returns original device scale factor. 411 // When emulated, this returns original device scale factor.
410 float GetOriginalDeviceScaleFactor() const; 412 float GetOriginalDeviceScaleFactor() const;
411 413
412 // Helper to convert |point| using ConvertWindowToViewport(). 414 // Helper to convert |point| using ConvertWindowToViewport().
413 gfx::Point ConvertWindowPointToViewport(const gfx::Point& point); 415 gfx::Point ConvertWindowPointToViewport(const gfx::Point& point);
414 416
417 virtual void TransferActiveWheelFlingAnimation(
418 const blink::WebActiveWheelFlingParameters& params) {}
419
415 protected: 420 protected:
416 // Friend RefCounted so that the dtor can be non-public. Using this class 421 // Friend RefCounted so that the dtor can be non-public. Using this class
417 // without ref-counting is an error. 422 // without ref-counting is an error.
418 friend class base::RefCounted<RenderWidget>; 423 friend class base::RefCounted<RenderWidget>;
419 424
420 // For unit tests. 425 // For unit tests.
421 friend class RenderWidgetTest; 426 friend class RenderWidgetTest;
422 427
423 enum ResizeAck { 428 enum ResizeAck {
424 SEND_RESIZE_ACK, 429 SEND_RESIZE_ACK,
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 784
780 std::unique_ptr<blink::scheduler::RenderWidgetSchedulingState> 785 std::unique_ptr<blink::scheduler::RenderWidgetSchedulingState>
781 render_widget_scheduling_state_; 786 render_widget_scheduling_state_;
782 787
783 // Mouse Lock dispatcher attached to this view. 788 // Mouse Lock dispatcher attached to this view.
784 std::unique_ptr<RenderWidgetMouseLockDispatcher> mouse_lock_dispatcher_; 789 std::unique_ptr<RenderWidgetMouseLockDispatcher> mouse_lock_dispatcher_;
785 790
786 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. 791 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface.
787 std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; 792 std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_;
788 793
794 bool has_added_input_handler_;
795
789 private: 796 private:
790 // Applies/Removes the DevTools device emulation transformation to/from a 797 // Applies/Removes the DevTools device emulation transformation to/from a
791 // window rect. 798 // window rect.
792 void ScreenRectToEmulatedIfNeeded(blink::WebRect* window_rect) const; 799 void ScreenRectToEmulatedIfNeeded(blink::WebRect* window_rect) const;
793 void EmulatedToScreenRectIfNeeded(blink::WebRect* window_rect) const; 800 void EmulatedToScreenRectIfNeeded(blink::WebRect* window_rect) const;
794 801
795 bool CreateWidget(int32_t opener_id, 802 bool CreateWidget(int32_t opener_id,
796 blink::WebPopupType popup_type, 803 blink::WebPopupType popup_type,
797 int32_t* routing_id); 804 int32_t* routing_id);
798 805
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 837
831 // Stores edit commands associated to the next key event. 838 // Stores edit commands associated to the next key event.
832 // Will be cleared as soon as the next key event is processed. 839 // Will be cleared as soon as the next key event is processed.
833 EditCommands edit_commands_; 840 EditCommands edit_commands_;
834 841
835 // This field stores drag/drop related info for the event that is currently 842 // This field stores drag/drop related info for the event that is currently
836 // being handled. If the current event results in starting a drag/drop 843 // being handled. If the current event results in starting a drag/drop
837 // session, this info is sent to the browser along with other drag/drop info. 844 // session, this info is sent to the browser along with other drag/drop info.
838 DragEventSourceInfo possible_drag_event_info_; 845 DragEventSourceInfo possible_drag_event_info_;
839 846
847 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_;
848
840 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 849 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
841 }; 850 };
842 851
843 } // namespace content 852 } // namespace content
844 853
845 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 854 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698