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

Side by Side Diff: views/view.h

Issue 8400059: Revert 107715 - Enable the new layer animation framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « views/layer_property_setter.cc ('k') | views/view.cc » ('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) 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 VIEWS_VIEW_H_ 5 #ifndef VIEWS_VIEW_H_
6 #define VIEWS_VIEW_H_ 6 #define VIEWS_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 18 matching lines...) Expand all
29 namespace gfx { 29 namespace gfx {
30 class Canvas; 30 class Canvas;
31 class Insets; 31 class Insets;
32 class Path; 32 class Path;
33 } 33 }
34 34
35 namespace ui { 35 namespace ui {
36 struct AccessibleViewState; 36 struct AccessibleViewState;
37 class Compositor; 37 class Compositor;
38 class Layer; 38 class Layer;
39 class LayerAnimationSequence;
40 class Texture; 39 class Texture;
41 class ThemeProvider; 40 class ThemeProvider;
42 class Transform; 41 class Transform;
43 enum TouchStatus; 42 enum TouchStatus;
44 } 43 }
45 44
46 #if defined(OS_WIN) 45 #if defined(OS_WIN)
47 class NativeViewAccessibilityWin; 46 class NativeViewAccessibilityWin;
48 #endif 47 #endif
49 48
50 namespace views { 49 namespace views {
51 50
52 class Background; 51 class Background;
53 class Border; 52 class Border;
54 class ContextMenuController; 53 class ContextMenuController;
55 class DragController; 54 class DragController;
56 class FocusManager; 55 class FocusManager;
57 class FocusTraversable; 56 class FocusTraversable;
58 class InputMethod; 57 class InputMethod;
58 class LayerPropertySetter;
59 class LayoutManager; 59 class LayoutManager;
60 class ScrollView; 60 class ScrollView;
61 class TextInputClient; 61 class TextInputClient;
62 class Widget; 62 class Widget;
63 63
64 namespace internal { 64 namespace internal {
65 class NativeWidgetView; 65 class NativeWidgetView;
66 class RootView; 66 class RootView;
67 } 67 }
68 68
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 void SetTransform(const ui::Transform& transform); 279 void SetTransform(const ui::Transform& transform);
280 280
281 // Sets whether this view paints to a layer. A view paints to a layer if 281 // Sets whether this view paints to a layer. A view paints to a layer if
282 // either of the following are true: 282 // either of the following are true:
283 // . the view has a non-identity transform. 283 // . the view has a non-identity transform.
284 // . SetPaintToLayer(true) has been invoked. 284 // . SetPaintToLayer(true) has been invoked.
285 // View creates the Layer only when it exists in a Widget with a non-NULL 285 // View creates the Layer only when it exists in a Widget with a non-NULL
286 // Compositor. 286 // Compositor.
287 void SetPaintToLayer(bool paint_to_layer); 287 void SetPaintToLayer(bool paint_to_layer);
288 288
289 // Sets the LayerPropertySetter for this view. A value of NULL resets the
290 // LayerPropertySetter to the default (immediate). Can only be called on a
291 // View that has a layer().
292 void SetLayerPropertySetter(LayerPropertySetter* setter);
293
289 const ui::Layer* layer() const { return layer_.get(); } 294 const ui::Layer* layer() const { return layer_.get(); }
290 ui::Layer* layer() { return layer_.get(); } 295 ui::Layer* layer() { return layer_.get(); }
291 296
292 // RTL positioning ----------------------------------------------------------- 297 // RTL positioning -----------------------------------------------------------
293 298
294 // Methods for accessing the bounds and position of the view, relative to its 299 // Methods for accessing the bounds and position of the view, relative to its
295 // parent. The position returned is mirrored if the parent view is using a RTL 300 // parent. The position returned is mirrored if the parent view is using a RTL
296 // layout. 301 // layout.
297 // 302 //
298 // NOTE: in the vast majority of the cases, the mirroring implementation is 303 // NOTE: in the vast majority of the cases, the mirroring implementation is
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 // the right layer. 983 // the right layer.
979 virtual void MoveLayerToParent(ui::Layer* parent_layer, 984 virtual void MoveLayerToParent(ui::Layer* parent_layer,
980 const gfx::Point& point); 985 const gfx::Point& point);
981 986
982 // Called to update the bounds of any child layers within this View's 987 // Called to update the bounds of any child layers within this View's
983 // hierarchy when something happens to the hierarchy. 988 // hierarchy when something happens to the hierarchy.
984 virtual void UpdateChildLayerBounds(const gfx::Point& offset); 989 virtual void UpdateChildLayerBounds(const gfx::Point& offset);
985 990
986 // Overridden from ui::LayerDelegate: 991 // Overridden from ui::LayerDelegate:
987 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; 992 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE;
988 virtual void OnLayerAnimationEnded( 993 virtual void OnLayerAnimationEnded(const ui::Animation* animation) OVERRIDE;
989 const ui::LayerAnimationSequence* animation) OVERRIDE;
990 994
991 // Finds the layer that this view paints to (it may belong to an ancestor 995 // Finds the layer that this view paints to (it may belong to an ancestor
992 // view), then reorders the immediate children of that layer to match the 996 // view), then reorders the immediate children of that layer to match the
993 // order of the view tree. 997 // order of the view tree.
994 virtual void ReorderLayers(); 998 virtual void ReorderLayers();
995 999
996 // This reorders the immediate children of |*parent_layer| to match the 1000 // This reorders the immediate children of |*parent_layer| to match the
997 // order of the view tree. 1001 // order of the view tree.
998 virtual void ReorderChildLayers(ui::Layer* parent_layer); 1002 virtual void ReorderChildLayers(ui::Layer* parent_layer);
999 1003
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 1393
1390 // Indicates whether or not the gfx::Canvas object passed to View::Paint() 1394 // Indicates whether or not the gfx::Canvas object passed to View::Paint()
1391 // is going to be flipped horizontally (using the appropriate transform) on 1395 // is going to be flipped horizontally (using the appropriate transform) on
1392 // right-to-left locales for this View. 1396 // right-to-left locales for this View.
1393 bool flip_canvas_on_paint_for_rtl_ui_; 1397 bool flip_canvas_on_paint_for_rtl_ui_;
1394 1398
1395 // Accelerated painting ------------------------------------------------------ 1399 // Accelerated painting ------------------------------------------------------
1396 1400
1397 bool paint_to_layer_; 1401 bool paint_to_layer_;
1398 scoped_ptr<ui::Layer> layer_; 1402 scoped_ptr<ui::Layer> layer_;
1403 scoped_ptr<LayerPropertySetter> layer_property_setter_;
1399 1404
1400 // Accelerators -------------------------------------------------------------- 1405 // Accelerators --------------------------------------------------------------
1401 1406
1402 // true if when we were added to hierarchy we were without focus manager 1407 // true if when we were added to hierarchy we were without focus manager
1403 // attempt addition when ancestor chain changed. 1408 // attempt addition when ancestor chain changed.
1404 bool accelerator_registration_delayed_; 1409 bool accelerator_registration_delayed_;
1405 1410
1406 // Focus manager accelerators registered on. 1411 // Focus manager accelerators registered on.
1407 FocusManager* accelerator_focus_manager_; 1412 FocusManager* accelerator_focus_manager_;
1408 1413
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1442 #if defined(OS_WIN) 1447 #if defined(OS_WIN)
1443 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_; 1448 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_;
1444 #endif 1449 #endif
1445 1450
1446 DISALLOW_COPY_AND_ASSIGN(View); 1451 DISALLOW_COPY_AND_ASSIGN(View);
1447 }; 1452 };
1448 1453
1449 } // namespace views 1454 } // namespace views
1450 1455
1451 #endif // VIEWS_VIEW_H_ 1456 #endif // VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « views/layer_property_setter.cc ('k') | views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698