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

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

Issue 79143002: Revert 236254 "Replace old with new synthetic gesture framework." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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>
11 #include <queue> 11 #include <queue>
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/callback.h" 16 #include "base/callback.h"
17 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
20 #include "base/observer_list.h" 20 #include "base/observer_list.h"
21 #include "base/process/kill.h" 21 #include "base/process/kill.h"
22 #include "base/strings/string16.h" 22 #include "base/strings/string16.h"
23 #include "base/time/time.h" 23 #include "base/time/time.h"
24 #include "base/timer/timer.h" 24 #include "base/timer/timer.h"
25 #include "build/build_config.h" 25 #include "build/build_config.h"
26 #include "content/browser/renderer_host/input/input_ack_handler.h" 26 #include "content/browser/renderer_host/input/input_ack_handler.h"
27 #include "content/browser/renderer_host/input/input_router_client.h" 27 #include "content/browser/renderer_host/input/input_router_client.h"
28 #include "content/browser/renderer_host/synthetic_gesture_controller.h"
28 #include "content/common/browser_rendering_stats.h" 29 #include "content/common/browser_rendering_stats.h"
29 #include "content/common/input/synthetic_gesture_packet.h"
30 #include "content/common/view_message_enums.h" 30 #include "content/common/view_message_enums.h"
31 #include "content/port/browser/event_with_latency_info.h" 31 #include "content/port/browser/event_with_latency_info.h"
32 #include "content/port/common/input_event_ack_state.h" 32 #include "content/port/common/input_event_ack_state.h"
33 #include "content/public/browser/render_widget_host.h" 33 #include "content/public/browser/render_widget_host.h"
34 #include "content/public/common/page_zoom.h" 34 #include "content/public/common/page_zoom.h"
35 #include "ipc/ipc_listener.h" 35 #include "ipc/ipc_listener.h"
36 #include "ui/base/ime/text_input_mode.h" 36 #include "ui/base/ime/text_input_mode.h"
37 #include "ui/base/ime/text_input_type.h" 37 #include "ui/base/ime/text_input_type.h"
38 #include "ui/events/latency_info.h" 38 #include "ui/events/latency_info.h"
39 #include "ui/gfx/native_widget_types.h" 39 #include "ui/gfx/native_widget_types.h"
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 504
505 void DetachDelegate(); 505 void DetachDelegate();
506 506
507 // Update the renderer's cache of the screen rect of the view and window. 507 // Update the renderer's cache of the screen rect of the view and window.
508 void SendScreenRects(); 508 void SendScreenRects();
509 509
510 OverscrollController* overscroll_controller() const { 510 OverscrollController* overscroll_controller() const {
511 return overscroll_controller_.get(); 511 return overscroll_controller_.get();
512 } 512 }
513 513
514 base::TimeDelta GetSyntheticGestureMessageInterval() const;
515
514 // Sets whether the overscroll controller should be enabled for this page. 516 // Sets whether the overscroll controller should be enabled for this page.
515 void SetOverscrollControllerEnabled(bool enabled); 517 void SetOverscrollControllerEnabled(bool enabled);
516 518
517 // Suppreses future char events until a keydown. See 519 // Suppreses future char events until a keydown. See
518 // suppress_next_char_events_. 520 // suppress_next_char_events_.
519 void SuppressNextCharEvents(); 521 void SuppressNextCharEvents();
520 522
521 // Called by RenderWidgetHostView in response to OnSetNeedsFlushInput. 523 // Called by RenderWidgetHostView in response to OnSetNeedsFlushInput.
522 void FlushInput(); 524 void FlushInput();
523 525
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 void OnPaintAtSizeAck(int tag, const gfx::Size& size); 653 void OnPaintAtSizeAck(int tag, const gfx::Size& size);
652 #if defined(OS_MACOSX) 654 #if defined(OS_MACOSX)
653 void OnCompositorSurfaceBuffersSwapped( 655 void OnCompositorSurfaceBuffersSwapped(
654 const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params); 656 const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params);
655 #endif 657 #endif
656 bool OnSwapCompositorFrame(const IPC::Message& message); 658 bool OnSwapCompositorFrame(const IPC::Message& message);
657 void OnOverscrolled(gfx::Vector2dF accumulated_overscroll, 659 void OnOverscrolled(gfx::Vector2dF accumulated_overscroll,
658 gfx::Vector2dF current_fling_velocity); 660 gfx::Vector2dF current_fling_velocity);
659 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); 661 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params);
660 void OnUpdateIsDelayed(); 662 void OnUpdateIsDelayed();
661 void OnQueueSyntheticGesture(const SyntheticGesturePacket& gesture_packet); 663 void OnBeginSmoothScroll(
664 const ViewHostMsg_BeginSmoothScroll_Params& params);
665 void OnBeginPinch(
666 const ViewHostMsg_BeginPinch_Params& params);
662 virtual void OnFocus(); 667 virtual void OnFocus();
663 virtual void OnBlur(); 668 virtual void OnBlur();
664 void OnSetCursor(const WebCursor& cursor); 669 void OnSetCursor(const WebCursor& cursor);
665 void OnTextInputTypeChanged(ui::TextInputType type, 670 void OnTextInputTypeChanged(ui::TextInputType type,
666 ui::TextInputMode input_mode, 671 ui::TextInputMode input_mode,
667 bool can_compose_inline); 672 bool can_compose_inline);
668 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) 673 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
669 void OnImeCompositionRangeChanged( 674 void OnImeCompositionRangeChanged(
670 const gfx::Range& range, 675 const gfx::Range& range,
671 const std::vector<gfx::Rect>& character_bounds); 676 const std::vector<gfx::Rect>& character_bounds);
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 bool pending_mouse_lock_request_; 896 bool pending_mouse_lock_request_;
892 bool allow_privileged_mouse_lock_; 897 bool allow_privileged_mouse_lock_;
893 898
894 // Keeps track of whether the webpage has any touch event handler. If it does, 899 // Keeps track of whether the webpage has any touch event handler. If it does,
895 // then touch events are sent to the renderer. Otherwise, the touch events are 900 // then touch events are sent to the renderer. Otherwise, the touch events are
896 // not sent to the renderer. 901 // not sent to the renderer.
897 bool has_touch_handler_; 902 bool has_touch_handler_;
898 903
899 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 904 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
900 905
901 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_; 906 SyntheticGestureController synthetic_gesture_controller_;
902 907
903 // Receives and handles all input events. 908 // Receives and handles all input events.
904 scoped_ptr<InputRouter> input_router_; 909 scoped_ptr<InputRouter> input_router_;
905 910
906 scoped_ptr<OverscrollController> overscroll_controller_; 911 scoped_ptr<OverscrollController> overscroll_controller_;
907 912
908 #if defined(OS_WIN) 913 #if defined(OS_WIN)
909 std::list<HWND> dummy_windows_for_activation_; 914 std::list<HWND> dummy_windows_for_activation_;
910 #endif 915 #endif
911 916
912 // List of callbacks for pending snapshot requests to the renderer. 917 // List of callbacks for pending snapshot requests to the renderer.
913 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_; 918 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_;
914 919
915 int64 last_input_number_; 920 int64 last_input_number_;
916 921
917 BrowserRenderingStats rendering_stats_; 922 BrowserRenderingStats rendering_stats_;
918 923
919 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 924 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
920 }; 925 };
921 926
922 } // namespace content 927 } // namespace content
923 928
924 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 929 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698