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

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

Issue 23444051: Move the content-dependent RecreateLayer logic from aura::Window to RWHVA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux_aura Created 7 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 "base/memory/ref_counted.h"
10 #include "ui/aura/aura_export.h" 10 #include "ui/aura/aura_export.h"
11 #include "ui/base/events/event_constants.h" 11 #include "ui/base/events/event_constants.h"
12 #include "ui/base/events/event_handler.h" 12 #include "ui/base/events/event_handler.h"
13 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
14 14
15 namespace gfx { 15 namespace gfx {
16 class Canvas; 16 class Canvas;
17 class Path; 17 class Path;
18 class Point; 18 class Point;
19 class Rect; 19 class Rect;
20 class Size; 20 class Size;
21 } 21 }
22 22
23 namespace ui { 23 namespace ui {
24 class GestureEvent; 24 class GestureEvent;
25 class KeyEvent; 25 class KeyEvent;
26 class Layer;
26 class MouseEvent; 27 class MouseEvent;
27 class Texture; 28 class Texture;
28 class TouchEvent; 29 class TouchEvent;
29 } 30 }
30 31
31 namespace aura { 32 namespace aura {
32 33
33 // Delegate interface for aura::Window. 34 // Delegate interface for aura::Window.
34 class AURA_EXPORT WindowDelegate : public ui::EventHandler { 35 class AURA_EXPORT WindowDelegate : public ui::EventHandler {
35 public: 36 public:
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // 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
89 // 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
90 // returns true, GetHitTestMask below will be called to get the mask. 91 // returns true, GetHitTestMask below will be called to get the mask.
91 // Otherwise, Window will hit-test against its bounds. 92 // Otherwise, Window will hit-test against its bounds.
92 virtual bool HasHitTestMask() const = 0; 93 virtual bool HasHitTestMask() const = 0;
93 94
94 // Called from Window::HitTest to retrieve hit test mask when HasHitTestMask 95 // Called from Window::HitTest to retrieve hit test mask when HasHitTestMask
95 // above returns true. 96 // above returns true.
96 virtual void GetHitTestMask(gfx::Path* mask) const = 0; 97 virtual void GetHitTestMask(gfx::Path* mask) const = 0;
97 98
98 // Called from RecreateLayer() if the layer the window is associated with has 99 // Called from RecreateLayer() if the layer the window is associated with has
sky 2013/09/11 01:57:23 nit: update comment as it appears to be wrong.
piman 2013/09/12 01:02:33 Done.
99 // an external texture. 100 // an external texture.
100 virtual scoped_refptr<ui::Texture> CopyTexture() = 0; 101 virtual void DidRecreateLayer(ui::Layer* old_layer, ui::Layer* new_layer) = 0;
101 102
102 protected: 103 protected:
103 virtual ~WindowDelegate() {} 104 virtual ~WindowDelegate() {}
104 }; 105 };
105 106
106 } // namespace aura 107 } // namespace aura
107 108
108 #endif // UI_AURA_WINDOW_DELEGATE_H_ 109 #endif // UI_AURA_WINDOW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698