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

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

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