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

Side by Side Diff: ui/aura/window_delegate.h

Issue 7976020: Wires up mouse capture code for aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks Created 9 years, 3 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
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_AURA_WINDOW_DELEGATE_H_ 5 #ifndef UI_AURA_WINDOW_DELEGATE_H_
6 #define UI_AURA_WINDOW_DELEGATE_H_ 6 #define UI_AURA_WINDOW_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 namespace gfx { 9 namespace gfx {
10 class Canvas; 10 class Canvas;
(...skipping 18 matching lines...) Expand all
29 virtual void OnBlur() = 0; 29 virtual void OnBlur() = 0;
30 30
31 virtual bool OnKeyEvent(KeyEvent* event) = 0; 31 virtual bool OnKeyEvent(KeyEvent* event) = 0;
32 32
33 // Returns the non-client component (see hit_test.h) containing |point|, in 33 // Returns the non-client component (see hit_test.h) containing |point|, in
34 // window coordinates. 34 // window coordinates.
35 virtual int GetNonClientComponent(const gfx::Point& point) const = 0; 35 virtual int GetNonClientComponent(const gfx::Point& point) const = 0;
36 36
37 virtual bool OnMouseEvent(MouseEvent* event) = 0; 37 virtual bool OnMouseEvent(MouseEvent* event) = 0;
38 38
39 // Invoked when mouse capture is gained on the window.
40 virtual void OnCaptureGained() = 0;
41
42 // Invoked when mouse capture is lost on the window.
43 virtual void OnCaptureLost() = 0;
44
39 // Asks the delegate to paint window contents into the supplied canvas. 45 // Asks the delegate to paint window contents into the supplied canvas.
40 virtual void OnPaint(gfx::Canvas* canvas) = 0; 46 virtual void OnPaint(gfx::Canvas* canvas) = 0;
41 47
42 // Called from Window's destructor before OnWindowDestroyed and before the 48 // Called from Window's destructor before OnWindowDestroyed and before the
43 // children have been destroyed. 49 // children have been destroyed.
44 virtual void OnWindowDestroying() = 0; 50 virtual void OnWindowDestroying() = 0;
45 51
46 // Called when the Window has been destroyed (i.e. from its destructor). This 52 // Called when the Window has been destroyed (i.e. from its destructor). This
47 // is called after OnWindowDestroying and after the children have been 53 // is called after OnWindowDestroying and after the children have been
48 // deleted. 54 // deleted.
49 // The delegate can use this as an opportunity to delete itself if necessary. 55 // The delegate can use this as an opportunity to delete itself if necessary.
50 virtual void OnWindowDestroyed() = 0; 56 virtual void OnWindowDestroyed() = 0;
51 57
52 protected: 58 protected:
53 virtual ~WindowDelegate() {} 59 virtual ~WindowDelegate() {}
54 }; 60 };
55 61
56 } // namespace aura 62 } // namespace aura
57 63
58 #endif // UI_AURA_WINDOW_DELEGATE_H_ 64 #endif // UI_AURA_WINDOW_DELEGATE_H_
OLDNEW
« ui/aura/window.cc ('K') | « ui/aura/window.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698