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

Side by Side Diff: ui/views/widget/native_widget_delegate.h

Issue 9076002: Initial views touchui Gesture Recognizer support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win release build Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/views.gyp ('k') | ui/views/widget/root_view.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_
6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/base/events.h" 9 #include "ui/base/events.h"
10 #include "ui/views/views_export.h" 10 #include "ui/views/views_export.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 class Canvas; 13 class Canvas;
14 class Point; 14 class Point;
15 class Size; 15 class Size;
16 } 16 }
17 17
18 namespace views { 18 namespace views {
19 class InputMethod; 19 class InputMethod;
20 class GestureEvent;
20 class KeyEvent; 21 class KeyEvent;
21 class MouseEvent; 22 class MouseEvent;
22 class TouchEvent; 23 class TouchEvent;
23 24
24 namespace internal { 25 namespace internal {
25 26
26 //////////////////////////////////////////////////////////////////////////////// 27 ////////////////////////////////////////////////////////////////////////////////
27 // NativeWidgetDelegate 28 // NativeWidgetDelegate
28 // 29 //
29 // An interface implemented by the object that handles events sent by a 30 // An interface implemented by the object that handles events sent by a
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 90
90 // Returns the non-client component (see ui/base/hit_test.h) containing 91 // Returns the non-client component (see ui/base/hit_test.h) containing
91 // |point|, in client coordinates. 92 // |point|, in client coordinates.
92 virtual int GetNonClientComponent(const gfx::Point& point) = 0; 93 virtual int GetNonClientComponent(const gfx::Point& point) = 0;
93 94
94 // Mouse and key event handlers. 95 // Mouse and key event handlers.
95 virtual bool OnKeyEvent(const KeyEvent& event) = 0; 96 virtual bool OnKeyEvent(const KeyEvent& event) = 0;
96 virtual bool OnMouseEvent(const MouseEvent& event) = 0; 97 virtual bool OnMouseEvent(const MouseEvent& event) = 0;
97 virtual void OnMouseCaptureLost() = 0; 98 virtual void OnMouseCaptureLost() = 0;
98 virtual ui::TouchStatus OnTouchEvent(const TouchEvent& event) = 0; 99 virtual ui::TouchStatus OnTouchEvent(const TouchEvent& event) = 0;
100 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event) = 0;
99 101
100 // Runs the specified native command. Returns true if the command is handled. 102 // Runs the specified native command. Returns true if the command is handled.
101 virtual bool ExecuteCommand(int command_id) = 0; 103 virtual bool ExecuteCommand(int command_id) = 0;
102 104
103 // Returns the input method of the widget this delegate is associated with. 105 // Returns the input method of the widget this delegate is associated with.
104 // Note that this does not use the top level widget, so may return NULL 106 // Note that this does not use the top level widget, so may return NULL
105 // if the widget doesn't have input method. 107 // if the widget doesn't have input method.
106 virtual InputMethod* GetInputMethodDirect() = 0; 108 virtual InputMethod* GetInputMethodDirect() = 0;
107 109
108 // 110 //
109 virtual Widget* AsWidget() = 0; 111 virtual Widget* AsWidget() = 0;
110 virtual const Widget* AsWidget() const = 0; 112 virtual const Widget* AsWidget() const = 0;
111 }; 113 };
112 114
113 } // namespace internal 115 } // namespace internal
114 } // namespace views 116 } // namespace views
115 117
116 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ 118 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/views.gyp ('k') | ui/views/widget/root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698