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

Side by Side Diff: ui/compositor/layer_owner.h

Issue 1474993003: Ensure View invalidates Widget::root_layers_ when LayerOwner::RecreateLayer is invoked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rollback ash/wm/window_state_unittest.cc - redundant now Created 5 years 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 | « no previous file | ui/views/view.h » ('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 (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_COMPOSITOR_LAYER_OWNER_H_ 5 #ifndef UI_COMPOSITOR_LAYER_OWNER_H_
6 #define UI_COMPOSITOR_LAYER_OWNER_H_ 6 #define UI_COMPOSITOR_LAYER_OWNER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/compositor/compositor_export.h" 10 #include "ui/compositor/compositor_export.h"
(...skipping 15 matching lines...) Expand all
26 // function, and the caller is then responsible for disposing of the layer 26 // function, and the caller is then responsible for disposing of the layer
27 // once any animation completes. Note that layer() will remain valid until the 27 // once any animation completes. Note that layer() will remain valid until the
28 // end of ~LayerOwner(). 28 // end of ~LayerOwner().
29 scoped_ptr<Layer> AcquireLayer(); 29 scoped_ptr<Layer> AcquireLayer();
30 30
31 // Asks the owner to recreate the layer, returning the old Layer. NULL is 31 // Asks the owner to recreate the layer, returning the old Layer. NULL is
32 // returned if there is no existing layer, or recreate is not supported. 32 // returned if there is no existing layer, or recreate is not supported.
33 // 33 //
34 // This does not recurse. Existing children of the layer are moved to the new 34 // This does not recurse. Existing children of the layer are moved to the new
35 // layer. 35 // layer.
36 scoped_ptr<Layer> RecreateLayer(); 36 virtual scoped_ptr<Layer> RecreateLayer();
37 37
38 ui::Layer* layer() { return layer_; } 38 ui::Layer* layer() { return layer_; }
39 const ui::Layer* layer() const { return layer_; } 39 const ui::Layer* layer() const { return layer_; }
40 40
41 void set_layer_owner_delegate(LayerOwnerDelegate* delegate) { 41 void set_layer_owner_delegate(LayerOwnerDelegate* delegate) {
42 layer_owner_delegate_ = delegate; 42 layer_owner_delegate_ = delegate;
43 } 43 }
44 44
45 protected: 45 protected:
46 void DestroyLayer(); 46 void DestroyLayer();
(...skipping 10 matching lines...) Expand all
57 Layer* layer_; 57 Layer* layer_;
58 58
59 LayerOwnerDelegate* layer_owner_delegate_; 59 LayerOwnerDelegate* layer_owner_delegate_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(LayerOwner); 61 DISALLOW_COPY_AND_ASSIGN(LayerOwner);
62 }; 62 };
63 63
64 } // namespace ui 64 } // namespace ui
65 65
66 #endif // UI_COMPOSITOR_LAYER_OWNER_H_ 66 #endif // UI_COMPOSITOR_LAYER_OWNER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698