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

Side by Side Diff: components/exo/pointer.h

Issue 2597753002: exo: Produce an error if stylus delegate is already associated. (Closed)
Patch Set: Created 4 years 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 | « no previous file | components/exo/pointer.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_EXO_POINTER_H_ 5 #ifndef COMPONENTS_EXO_POINTER_H_
6 #define COMPONENTS_EXO_POINTER_H_ 6 #define COMPONENTS_EXO_POINTER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 29 matching lines...) Expand all
40 explicit Pointer(PointerDelegate* delegate); 40 explicit Pointer(PointerDelegate* delegate);
41 ~Pointer() override; 41 ~Pointer() override;
42 42
43 // Set the pointer surface, i.e., the surface that contains the pointer image 43 // Set the pointer surface, i.e., the surface that contains the pointer image
44 // (cursor). The |hotspot| argument defines the position of the pointer 44 // (cursor). The |hotspot| argument defines the position of the pointer
45 // surface relative to the pointer location. Its top-left corner is always at 45 // surface relative to the pointer location. Its top-left corner is always at
46 // (x, y) - (hotspot.x, hotspot.y), where (x, y) are the coordinates of the 46 // (x, y) - (hotspot.x, hotspot.y), where (x, y) are the coordinates of the
47 // pointer location, in surface local coordinates. 47 // pointer location, in surface local coordinates.
48 void SetCursor(Surface* surface, const gfx::Point& hotspot); 48 void SetCursor(Surface* surface, const gfx::Point& hotspot);
49 49
50 bool HasStylusDelegate() const;
50 // Set delegate for stylus events. 51 // Set delegate for stylus events.
51 void SetStylusDelegate(PointerStylusDelegate* delegate); 52 void SetStylusDelegate(PointerStylusDelegate* delegate);
52 53
53 // Overridden from ui::EventHandler: 54 // Overridden from ui::EventHandler:
54 void OnMouseEvent(ui::MouseEvent* event) override; 55 void OnMouseEvent(ui::MouseEvent* event) override;
55 void OnScrollEvent(ui::ScrollEvent* event) override; 56 void OnScrollEvent(ui::ScrollEvent* event) override;
56 57
57 // Overridden from WMHelper::CursorObserver: 58 // Overridden from WMHelper::CursorObserver:
58 void OnCursorSetChanged(ui::CursorSetType cursor_set) override; 59 void OnCursorSetChanged(ui::CursorSetType cursor_set) override;
59 60
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 110
110 // True if the pointer is controlled via direct input. 111 // True if the pointer is controlled via direct input.
111 bool is_direct_input_ = false; 112 bool is_direct_input_ = false;
112 113
113 DISALLOW_COPY_AND_ASSIGN(Pointer); 114 DISALLOW_COPY_AND_ASSIGN(Pointer);
114 }; 115 };
115 116
116 } // namespace exo 117 } // namespace exo
117 118
118 #endif // COMPONENTS_EXO_POINTER_H_ 119 #endif // COMPONENTS_EXO_POINTER_H_
OLDNEW
« no previous file with comments | « no previous file | components/exo/pointer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698