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

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

Issue 10910242: Makes copying layers clone external textures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h"
9 #include "ui/aura/aura_export.h" 10 #include "ui/aura/aura_export.h"
10 #include "ui/base/events/event_constants.h" 11 #include "ui/base/events/event_constants.h"
11 #include "ui/base/events/event_handler.h" 12 #include "ui/base/events/event_handler.h"
12 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
13 14
14 namespace gfx { 15 namespace gfx {
15 class Canvas; 16 class Canvas;
16 class Path; 17 class Path;
17 class Point; 18 class Point;
18 class Rect; 19 class Rect;
19 class Size; 20 class Size;
20 } 21 }
21 22
22 namespace ui { 23 namespace ui {
23 class GestureEvent; 24 class GestureEvent;
24 class KeyEvent; 25 class KeyEvent;
25 class MouseEvent; 26 class MouseEvent;
27 class Texture;
26 class TouchEvent; 28 class TouchEvent;
27 } 29 }
28 30
29 namespace aura { 31 namespace aura {
30 32
31 // Delegate interface for aura::Window. 33 // Delegate interface for aura::Window.
32 class AURA_EXPORT WindowDelegate : public ui::EventHandler { 34 class AURA_EXPORT WindowDelegate : public ui::EventHandler {
33 public: 35 public:
34 // Returns the window's minimum size, or size 0,0 if there is no limit. 36 // Returns the window's minimum size, or size 0,0 if there is no limit.
35 virtual gfx::Size GetMinimumSize() const = 0; 37 virtual gfx::Size GetMinimumSize() const = 0;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Called from Window::HitTest to check if the window has a custom hit test 89 // Called from Window::HitTest to check if the window has a custom hit test
88 // mask. It works similar to the views counterparts. That is, if the function 90 // mask. It works similar to the views counterparts. That is, if the function
89 // returns true, GetHitTestMask below will be called to get the mask. 91 // returns true, GetHitTestMask below will be called to get the mask.
90 // Otherwise, Window will hit-test against its bounds. 92 // Otherwise, Window will hit-test against its bounds.
91 virtual bool HasHitTestMask() const = 0; 93 virtual bool HasHitTestMask() const = 0;
92 94
93 // Called from Window::HitTest to retrieve hit test mask when HasHitTestMask 95 // Called from Window::HitTest to retrieve hit test mask when HasHitTestMask
94 // above returns true. 96 // above returns true.
95 virtual void GetHitTestMask(gfx::Path* mask) const = 0; 97 virtual void GetHitTestMask(gfx::Path* mask) const = 0;
96 98
99 // Called from RecreateLayer() if the layer the window is associated with has
100 // an external texture.
101 virtual scoped_refptr<ui::Texture> CopyTexture() = 0;
102
97 protected: 103 protected:
98 virtual ~WindowDelegate() {} 104 virtual ~WindowDelegate() {}
99 105
100 // Overridden from ui::EventHandler: 106 // Overridden from ui::EventHandler:
101 virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; 107 virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
102 }; 108 };
103 109
104 } // namespace aura 110 } // namespace aura
105 111
106 #endif // UI_AURA_WINDOW_DELEGATE_H_ 112 #endif // UI_AURA_WINDOW_DELEGATE_H_
OLDNEW
« ui/aura/window.cc ('K') | « ui/aura/window.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698