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

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

Issue 67383002: Initial browser-side implementation for touch-action (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks from sadrul/jdduke CR 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_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 <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "base/timer/timer.h" 16 #include "base/timer/timer.h"
17 #include "cc/debug/rendering_stats_instrumentation.h" 17 #include "cc/debug/rendering_stats_instrumentation.h"
18 #include "content/common/browser_rendering_stats.h" 18 #include "content/common/browser_rendering_stats.h"
19 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
20 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 20 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
21 #include "content/renderer/paint_aggregator.h" 21 #include "content/renderer/paint_aggregator.h"
22 #include "ipc/ipc_listener.h" 22 #include "ipc/ipc_listener.h"
23 #include "ipc/ipc_sender.h" 23 #include "ipc/ipc_sender.h"
24 #include "third_party/WebKit/public/platform/WebRect.h" 24 #include "third_party/WebKit/public/platform/WebRect.h"
25 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" 25 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
26 #include "third_party/WebKit/public/web/WebPopupType.h" 26 #include "third_party/WebKit/public/web/WebPopupType.h"
27 #include "third_party/WebKit/public/web/WebTextDirection.h" 27 #include "third_party/WebKit/public/web/WebTextDirection.h"
28 #include "third_party/WebKit/public/web/WebTextInputInfo.h" 28 #include "third_party/WebKit/public/web/WebTextInputInfo.h"
29 #include "third_party/WebKit/public/web/WebTouchAction.h"
29 #include "third_party/WebKit/public/web/WebWidget.h" 30 #include "third_party/WebKit/public/web/WebWidget.h"
30 #include "third_party/WebKit/public/web/WebWidgetClient.h" 31 #include "third_party/WebKit/public/web/WebWidgetClient.h"
31 #include "third_party/skia/include/core/SkBitmap.h" 32 #include "third_party/skia/include/core/SkBitmap.h"
32 #include "ui/base/ime/text_input_mode.h" 33 #include "ui/base/ime/text_input_mode.h"
33 #include "ui/base/ime/text_input_type.h" 34 #include "ui/base/ime/text_input_type.h"
34 #include "ui/gfx/native_widget_types.h" 35 #include "ui/gfx/native_widget_types.h"
35 #include "ui/gfx/range/range.h" 36 #include "ui/gfx/range/range.h"
36 #include "ui/gfx/rect.h" 37 #include "ui/gfx/rect.h"
37 #include "ui/gfx/vector2d.h" 38 #include "ui/gfx/vector2d.h"
38 #include "ui/gfx/vector2d_f.h" 39 #include "ui/gfx/vector2d_f.h"
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 // just handled. 537 // just handled.
537 virtual void DidHandleTouchEvent(const blink::WebTouchEvent& event) {} 538 virtual void DidHandleTouchEvent(const blink::WebTouchEvent& event) {}
538 539
539 // Check whether the WebWidget has any touch event handlers registered 540 // Check whether the WebWidget has any touch event handlers registered
540 // at the given point. 541 // at the given point.
541 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const; 542 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const;
542 543
543 // Check whether the WebWidget has any touch event handlers registered. 544 // Check whether the WebWidget has any touch event handlers registered.
544 virtual void hasTouchEventHandlers(bool has_handlers); 545 virtual void hasTouchEventHandlers(bool has_handlers);
545 546
547 // Tell the browser about the actions permitted for a new touch point.
548 virtual void setTouchAction(blink::WebTouchAction touch_action);
549
546 // Creates a 3D context associated with this view. 550 // Creates a 3D context associated with this view.
547 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D( 551 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D(
548 const blink::WebGraphicsContext3D::Attributes& attributes); 552 const blink::WebGraphicsContext3D::Attributes& attributes);
549 553
550 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); 554 bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap);
551 555
552 void ScheduleCompositeImpl(bool force_redraw); 556 void ScheduleCompositeImpl(bool force_redraw);
553 557
554 // Routing ID that allows us to communicate to the parent browser process 558 // Routing ID that allows us to communicate to the parent browser process
555 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. 559 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 654
651 // Indicates whether we have been focused/unfocused by the browser. 655 // Indicates whether we have been focused/unfocused by the browser.
652 bool has_focus_; 656 bool has_focus_;
653 657
654 // Are we currently handling an input event? 658 // Are we currently handling an input event?
655 bool handling_input_event_; 659 bool handling_input_event_;
656 660
657 // Are we currently handling an ime event? 661 // Are we currently handling an ime event?
658 bool handling_ime_event_; 662 bool handling_ime_event_;
659 663
664 // Are we currently handling a touchstart event?
665 bool handling_touchstart_event_;
666
660 // True if we have requested this widget be closed. No more messages will 667 // True if we have requested this widget be closed. No more messages will
661 // be sent, except for a Close. 668 // be sent, except for a Close.
662 bool closing_; 669 bool closing_;
663 670
664 // Whether this RenderWidget is currently swapped out, such that the view is 671 // Whether this RenderWidget is currently swapped out, such that the view is
665 // being rendered by another process. If all RenderWidgets in a process are 672 // being rendered by another process. If all RenderWidgets in a process are
666 // swapped out, the process can exit. 673 // swapped out, the process can exit.
667 bool is_swapped_out_; 674 bool is_swapped_out_;
668 675
669 // Indicates if an input method is active in the browser process. 676 // Indicates if an input method is active in the browser process.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 float popup_origin_scale_for_emulation_; 796 float popup_origin_scale_for_emulation_;
790 797
791 scoped_ptr<ResizingModeSelector> resizing_mode_selector_; 798 scoped_ptr<ResizingModeSelector> resizing_mode_selector_;
792 799
793 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 800 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
794 }; 801 };
795 802
796 } // namespace content 803 } // namespace content
797 804
798 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 805 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698