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

Side by Side Diff: third_party/WebKit/Source/core/events/MouseEvent.h

Issue 2785853002: Selection Action mode triggered like a context menu (Closed)
Patch Set: fix tests Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 29 matching lines...) Expand all
40 public: 40 public:
41 enum SyntheticEventType { 41 enum SyntheticEventType {
42 // Real mouse input events or synthetic events that behave just like real 42 // Real mouse input events or synthetic events that behave just like real
43 // events 43 // events
44 kRealOrIndistinguishable, 44 kRealOrIndistinguishable,
45 // Synthetic mouse events derived from touch input 45 // Synthetic mouse events derived from touch input
46 kFromTouch, 46 kFromTouch,
47 // Synthetic mouse events generated without a position, for example those 47 // Synthetic mouse events generated without a position, for example those
48 // generated from keyboard input. 48 // generated from keyboard input.
49 kPositionless, 49 kPositionless,
50 // Synthetic mouse event derived from Select All (used for context menu).
51 kFromSelectAll,
50 }; 52 };
51 53
52 static MouseEvent* Create() { return new MouseEvent; } 54 static MouseEvent* Create() { return new MouseEvent; }
53 55
54 static MouseEvent* Create(const AtomicString& event_type, 56 static MouseEvent* Create(const AtomicString& event_type,
55 AbstractView*, 57 AbstractView*,
56 const WebMouseEvent&, 58 const WebMouseEvent&,
57 int detail, 59 int detail,
58 const String& canvas_region_id, 60 const String& canvas_region_id,
59 Node* related_target); 61 Node* related_target);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 105 }
104 const String& region() const { return region_; } 106 const String& region() const { return region_; }
105 107
106 Node* toElement() const; 108 Node* toElement() const;
107 Node* fromElement() const; 109 Node* fromElement() const;
108 110
109 virtual DataTransfer* getDataTransfer() const { return nullptr; } 111 virtual DataTransfer* getDataTransfer() const { return nullptr; }
110 112
111 bool FromTouch() const { return synthetic_event_type_ == kFromTouch; } 113 bool FromTouch() const { return synthetic_event_type_ == kFromTouch; }
112 114
115 bool FromSelectAll() const { return synthetic_event_type_ == kFromSelectAll; }
116
113 const AtomicString& InterfaceName() const override; 117 const AtomicString& InterfaceName() const override;
114 118
115 bool IsMouseEvent() const override; 119 bool IsMouseEvent() const override;
116 int which() const final; 120 int which() const final;
117 121
118 EventDispatchMediator* CreateMediator() override; 122 EventDispatchMediator* CreateMediator() override;
119 123
120 int ClickCount() { return detail(); } 124 int ClickCount() { return detail(); }
121 125
122 const WebMouseEvent* NativeEvent() const { return native_event_.get(); } 126 const WebMouseEvent* NativeEvent() const { return native_event_.get(); }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 MouseEvent& Event() const; 275 MouseEvent& Event() const;
272 276
273 DispatchEventResult DispatchEvent(EventDispatcher&) const override; 277 DispatchEventResult DispatchEvent(EventDispatcher&) const override;
274 }; 278 };
275 279
276 DEFINE_EVENT_TYPE_CASTS(MouseEvent); 280 DEFINE_EVENT_TYPE_CASTS(MouseEvent);
277 281
278 } // namespace blink 282 } // namespace blink
279 283
280 #endif // MouseEvent_h 284 #endif // MouseEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698