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

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

Issue 10134045: Getting RenderWidgetHostViewWin ready for a GestureRecognizer. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed const ref's. Created 8 years, 7 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/browser/renderer_host/render_widget_host_view_win.h ('k') | ui/aura/root_window.h » ('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 #include "content/browser/renderer_host/render_widget_host_view_win.h" 5 #include "content/browser/renderer_host/render_widget_host_view_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <peninputpanel_i.c> 8 #include <peninputpanel_i.c>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 28 matching lines...) Expand all
39 #include "content/public/browser/notification_service.h" 39 #include "content/public/browser/notification_service.h"
40 #include "content/public/browser/notification_types.h" 40 #include "content/public/browser/notification_types.h"
41 #include "content/public/common/content_switches.h" 41 #include "content/public/common/content_switches.h"
42 #include "content/public/common/page_zoom.h" 42 #include "content/public/common/page_zoom.h"
43 #include "content/public/common/process_type.h" 43 #include "content/public/common/process_type.h"
44 #include "skia/ext/skia_utils_win.h" 44 #include "skia/ext/skia_utils_win.h"
45 #include "third_party/skia/include/core/SkRegion.h" 45 #include "third_party/skia/include/core/SkRegion.h"
46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h" 46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h"
47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
48 #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFact ory.h" 48 #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFact ory.h"
49 #include "ui/base/gestures/gesture_recognizer.h"
49 #include "ui/base/ime/composition_text.h" 50 #include "ui/base/ime/composition_text.h"
50 #include "ui/base/l10n/l10n_util_win.h" 51 #include "ui/base/l10n/l10n_util_win.h"
51 #include "ui/base/text/text_elider.h" 52 #include "ui/base/text/text_elider.h"
52 #include "ui/base/ui_base_switches.h" 53 #include "ui/base/ui_base_switches.h"
53 #include "ui/base/view_prop.h" 54 #include "ui/base/view_prop.h"
54 #include "ui/base/win/hwnd_util.h" 55 #include "ui/base/win/hwnd_util.h"
55 #include "ui/base/win/mouse_wheel_util.h" 56 #include "ui/base/win/mouse_wheel_util.h"
56 #include "ui/gfx/canvas.h" 57 #include "ui/gfx/canvas.h"
57 #include "ui/gfx/gdi_util.h" 58 #include "ui/gfx/gdi_util.h"
58 #include "ui/gfx/rect.h" 59 #include "ui/gfx/rect.h"
59 #include "ui/gfx/screen.h" 60 #include "ui/gfx/screen.h"
61 #include "ui/views/events/event.h"
sky 2012/05/04 16:34:36 As Rob pointed out, this include isn't allowed fro
60 #include "webkit/glue/webaccessibility.h" 62 #include "webkit/glue/webaccessibility.h"
61 #include "webkit/glue/webcursor.h" 63 #include "webkit/glue/webcursor.h"
62 #include "webkit/plugins/npapi/plugin_constants_win.h" 64 #include "webkit/plugins/npapi/plugin_constants_win.h"
63 #include "webkit/plugins/npapi/webplugin.h" 65 #include "webkit/plugins/npapi/webplugin.h"
64 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" 66 #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
65 67
66 using base::TimeDelta; 68 using base::TimeDelta;
67 using base::TimeTicks; 69 using base::TimeTicks;
68 using content::BrowserThread; 70 using content::BrowserThread;
69 using content::RenderWidgetHost; 71 using content::RenderWidgetHost;
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 // state. If we want touch mode, then we attempt to register for touch 988 // state. If we want touch mode, then we attempt to register for touch
987 // events, and otherwise to unregister. 989 // events, and otherwise to unregister.
988 if (touch_mode) { 990 if (touch_mode) {
989 touch_mode = SetToTouchMode(); 991 touch_mode = SetToTouchMode();
990 } 992 }
991 if (!touch_mode) { 993 if (!touch_mode) {
992 SetToGestureMode(); 994 SetToGestureMode();
993 } 995 }
994 } 996 }
995 997
998 ui::GestureEvent* RenderWidgetHostViewWin::CreateGestureEvent(
999 ui::EventType type,
1000 const gfx::Point& location,
1001 int flags,
1002 base::Time time,
1003 float param_first,
1004 float param_second,
1005 unsigned int touch_id_bitfield) {
1006 return new views::GestureEvent(type, location.x(), location.y(), flags, time,
1007 param_first, param_second, touch_id_bitfield);
1008 }
1009
1010 ui::TouchEvent* RenderWidgetHostViewWin::CreateTouchEvent(
1011 ui::EventType type,
1012 const gfx::Point& location,
1013 int touch_id,
1014 base::TimeDelta time_stamp) {
1015 return new views::TouchEvent(
1016 type, location.x(), location.y(), 0, touch_id, 0, 0, 0, 0);
1017 }
1018
1019 bool RenderWidgetHostViewWin::DispatchLongPressGestureEvent(
1020 ui::GestureEvent* event) {
1021 // TODO: Implement.
1022 return false;
1023 }
1024
1025 bool RenderWidgetHostViewWin::DispatchCancelTouchEvent(
1026 ui::TouchEvent* event) {
1027 // TODO: Implement.
1028 return false;
1029 }
1030
996 void RenderWidgetHostViewWin::SetHasHorizontalScrollbar( 1031 void RenderWidgetHostViewWin::SetHasHorizontalScrollbar(
997 bool has_horizontal_scrollbar) { 1032 bool has_horizontal_scrollbar) {
998 } 1033 }
999 1034
1000 void RenderWidgetHostViewWin::SetScrollOffsetPinning( 1035 void RenderWidgetHostViewWin::SetScrollOffsetPinning(
1001 bool is_pinned_to_left, bool is_pinned_to_right) { 1036 bool is_pinned_to_left, bool is_pinned_to_right) {
1002 } 1037 }
1003 1038
1004 /////////////////////////////////////////////////////////////////////////////// 1039 ///////////////////////////////////////////////////////////////////////////////
1005 // RenderWidgetHostViewWin, private: 1040 // RenderWidgetHostViewWin, private:
(...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after
2697 void RenderWidgetHostViewWin::ResetPointerDownContext() { 2732 void RenderWidgetHostViewWin::ResetPointerDownContext() {
2698 // If the default focus on the page is on an edit field and we did not 2733 // If the default focus on the page is on an edit field and we did not
2699 // receive a focus change in the context of a pointer down message, it means 2734 // receive a focus change in the context of a pointer down message, it means
2700 // that the pointer down message occurred on the edit field and we should 2735 // that the pointer down message occurred on the edit field and we should
2701 // display the on screen keyboard 2736 // display the on screen keyboard
2702 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) 2737 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_)
2703 DisplayOnScreenKeyboardIfNeeded(); 2738 DisplayOnScreenKeyboardIfNeeded();
2704 received_focus_change_after_pointer_down_ = false; 2739 received_focus_change_after_pointer_down_ = false;
2705 pointer_down_context_ = false; 2740 pointer_down_context_ = false;
2706 } 2741 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.h ('k') | ui/aura/root_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698