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

Side by Side Diff: ui/views/cocoa/cocoa_mouse_capture_delegate.h

Issue 2096993002: MacViews: Fix failing mouse capture unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mouse_capture_lifetime
Patch Set: Enable tests. Created 4 years, 5 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 | « ui/views/cocoa/cocoa_mouse_capture.mm ('k') | ui/views/cocoa/cocoa_mouse_capture_unittest.mm » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_COCOA_COCOA_MOUSE_CAPTURE_DELEGATE_H_ 5 #ifndef UI_VIEWS_COCOA_COCOA_MOUSE_CAPTURE_DELEGATE_H_
6 #define UI_VIEWS_COCOA_COCOA_MOUSE_CAPTURE_DELEGATE_H_ 6 #define UI_VIEWS_COCOA_COCOA_MOUSE_CAPTURE_DELEGATE_H_
7 7
8 @class NSEvent; 8 @class NSEvent;
9 @class NSWindow;
9 10
10 namespace views { 11 namespace views {
11 12
12 // Delegate for receiving captured events from a CocoaMouseCapture. 13 // Delegate for receiving captured events from a CocoaMouseCapture.
13 class CocoaMouseCaptureDelegate { 14 class CocoaMouseCaptureDelegate {
14 public: 15 public:
15 // Called when an event has been captured. This may be an event local to the 16 // Called when an event has been captured. This may be an event local to the
16 // application, or a global event (sent to another application). If it is a 17 // application, or a global event (sent to another application). If it is a
17 // local event, regular event handling will be suppressed. 18 // local event, regular event handling will be suppressed.
18 virtual void PostCapturedEvent(NSEvent* event) = 0; 19 virtual void PostCapturedEvent(NSEvent* event) = 0;
19 20
20 // Called once. When another window acquires capture, or when the 21 // Called once. When another window acquires capture, or when the
21 // CocoaMouseCapture is destroyed. 22 // CocoaMouseCapture is destroyed.
22 virtual void OnMouseCaptureLost() = 0; 23 virtual void OnMouseCaptureLost() = 0;
24
25 // Returns the associated NSWindow.
26 virtual NSWindow* GetWindow() const = 0;
23 }; 27 };
24 28
25 } // namespace views 29 } // namespace views
26 30
27 #endif // UI_VIEWS_COCOA_COCOA_MOUSE_CAPTURE_DELEGATE_H_ 31 #endif // UI_VIEWS_COCOA_COCOA_MOUSE_CAPTURE_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/cocoa/cocoa_mouse_capture.mm ('k') | ui/views/cocoa/cocoa_mouse_capture_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698