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

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

Issue 9549020: Improve switch between gestures and touch mode when kEnableTouchEvents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | 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_VIEW_WIN_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <atlbase.h> 9 #include <atlbase.h>
10 #include <atlapp.h> 10 #include <atlapp.h>
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, 190 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy,
191 const std::vector<gfx::Rect>& copy_rects) OVERRIDE; 191 const std::vector<gfx::Rect>& copy_rects) OVERRIDE;
192 virtual void RenderViewGone(base::TerminationStatus status, 192 virtual void RenderViewGone(base::TerminationStatus status,
193 int error_code) OVERRIDE; 193 int error_code) OVERRIDE;
194 // called by TabContents before DestroyWindow 194 // called by TabContents before DestroyWindow
195 virtual void WillWmDestroy() OVERRIDE; 195 virtual void WillWmDestroy() OVERRIDE;
196 virtual void Destroy() OVERRIDE; 196 virtual void Destroy() OVERRIDE;
197 virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; 197 virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE;
198 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE; 198 virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE;
199 virtual void OnAcceleratedCompositingStateChange() OVERRIDE; 199 virtual void OnAcceleratedCompositingStateChange() OVERRIDE;
200 virtual void ProcessTouchAck(bool processed) OVERRIDE; 200 virtual void ProcessTouchAck(WebKit::WebInputEvent::Type type,
201 bool processed) OVERRIDE;
201 virtual void SetHasHorizontalScrollbar( 202 virtual void SetHasHorizontalScrollbar(
202 bool has_horizontal_scrollbar) OVERRIDE; 203 bool has_horizontal_scrollbar) OVERRIDE;
203 virtual void SetScrollOffsetPinning( 204 virtual void SetScrollOffsetPinning(
204 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; 205 bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE;
205 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; 206 virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
206 virtual void AcceleratedSurfaceBuffersSwapped( 207 virtual void AcceleratedSurfaceBuffersSwapped(
207 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, 208 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
208 int gpu_host_id) OVERRIDE; 209 int gpu_host_id) OVERRIDE;
209 virtual void AcceleratedSurfacePostSubBuffer( 210 virtual void AcceleratedSurfacePostSubBuffer(
210 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, 211 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 LRESULT OnDocumentFeed(RECONVERTSTRING* reconv); 362 LRESULT OnDocumentFeed(RECONVERTSTRING* reconv);
362 LRESULT OnReconvertString(RECONVERTSTRING* reconv); 363 LRESULT OnReconvertString(RECONVERTSTRING* reconv);
363 364
364 // Displays the on screen keyboard for editable fields. 365 // Displays the on screen keyboard for editable fields.
365 void DisplayOnScreenKeyboardIfNeeded(); 366 void DisplayOnScreenKeyboardIfNeeded();
366 367
367 // Invoked in a delayed task to reset the fact that we are in the context of 368 // Invoked in a delayed task to reset the fact that we are in the context of
368 // a WM_POINTERDOWN message. 369 // a WM_POINTERDOWN message.
369 void ResetPointerDownContext(); 370 void ResetPointerDownContext();
370 371
372 // Switches between raw-touches mode and gesture mode. Currently touch mode
373 // will only take effect when kEnableTouchEvents is in effect.
374 void UpdateDesiredTouchMode(bool touch);
375
376 // Set window to receive gestures.
377 void SetToGestureMode();
378
379 // Set window to raw touch events. Returns whether registering was successful.
380 bool SetToTouchMode();
381
371 // The associated Model. While |this| is being Destroyed, 382 // The associated Model. While |this| is being Destroyed,
372 // |render_widget_host_| is NULL and the Windows message loop is run one last 383 // |render_widget_host_| is NULL and the Windows message loop is run one last
373 // time. Message handlers must check for a NULL |render_widget_host_|. 384 // time. Message handlers must check for a NULL |render_widget_host_|.
374 RenderWidgetHostImpl* render_widget_host_; 385 RenderWidgetHostImpl* render_widget_host_;
375 386
376 // When we are doing accelerated compositing 387 // When we are doing accelerated compositing
377 HWND compositor_host_window_; 388 HWND compositor_host_window_;
378 389
379 // Presents a texture received from another process to the compositing 390 // Presents a texture received from another process to the compositing
380 // window. 391 // window.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 550
540 // Set to true if the focus is currently on an editable field on the page. 551 // Set to true if the focus is currently on an editable field on the page.
541 bool focus_on_editable_field_; 552 bool focus_on_editable_field_;
542 553
543 // Set to true if we received a focus change after a WM_POINTERDOWN message. 554 // Set to true if we received a focus change after a WM_POINTERDOWN message.
544 bool received_focus_change_after_pointer_down_; 555 bool received_focus_change_after_pointer_down_;
545 556
546 // Region in which the view will be transparent to clicks. 557 // Region in which the view will be transparent to clicks.
547 gfx::ScopedSkRegion transparent_region_; 558 gfx::ScopedSkRegion transparent_region_;
548 559
560 // Are touch events currently enabled?
561 bool touch_events_enabled_;
562
549 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin); 563 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin);
550 }; 564 };
551 565
552 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_ 566 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698