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

Side by Side Diff: views/view.h

Issue 8362006: Reland r107720 - Enable the new layer animation framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with parent patch Created 9 years, 2 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 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 LayerAnimator;
39 class Texture; 40 class Texture;
40 class ThemeProvider; 41 class ThemeProvider;
41 class Transform; 42 class Transform;
42 enum TouchStatus; 43 enum TouchStatus;
43 } 44 }
44 45
45 #if defined(OS_WIN) 46 #if defined(OS_WIN)
46 class NativeViewAccessibilityWin; 47 class NativeViewAccessibilityWin;
47 #endif 48 #endif
48 49
49 namespace views { 50 namespace views {
50 51
51 class Background; 52 class Background;
52 class Border; 53 class Border;
53 class ContextMenuController; 54 class ContextMenuController;
54 class DragController; 55 class DragController;
55 class FocusManager; 56 class FocusManager;
56 class FocusTraversable; 57 class FocusTraversable;
57 class InputMethod; 58 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
294 const ui::Layer* layer() const { return layer_.get(); } 289 const ui::Layer* layer() const { return layer_.get(); }
295 ui::Layer* layer() { return layer_.get(); } 290 ui::Layer* layer() { return layer_.get(); }
296 291
297 // RTL positioning ----------------------------------------------------------- 292 // RTL positioning -----------------------------------------------------------
298 293
299 // Methods for accessing the bounds and position of the view, relative to its 294 // Methods for accessing the bounds and position of the view, relative to its
300 // parent. The position returned is mirrored if the parent view is using a RTL 295 // parent. The position returned is mirrored if the parent view is using a RTL
301 // layout. 296 // layout.
302 // 297 //
303 // NOTE: in the vast majority of the cases, the mirroring implementation is 298 // NOTE: in the vast majority of the cases, the mirroring implementation is
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 1386
1392 // Indicates whether or not the gfx::Canvas object passed to View::Paint() 1387 // Indicates whether or not the gfx::Canvas object passed to View::Paint()
1393 // is going to be flipped horizontally (using the appropriate transform) on 1388 // is going to be flipped horizontally (using the appropriate transform) on
1394 // right-to-left locales for this View. 1389 // right-to-left locales for this View.
1395 bool flip_canvas_on_paint_for_rtl_ui_; 1390 bool flip_canvas_on_paint_for_rtl_ui_;
1396 1391
1397 // Accelerated painting ------------------------------------------------------ 1392 // Accelerated painting ------------------------------------------------------
1398 1393
1399 bool paint_to_layer_; 1394 bool paint_to_layer_;
1400 scoped_ptr<ui::Layer> layer_; 1395 scoped_ptr<ui::Layer> layer_;
1401 scoped_ptr<LayerPropertySetter> layer_property_setter_;
1402 1396
1403 // Accelerators -------------------------------------------------------------- 1397 // Accelerators --------------------------------------------------------------
1404 1398
1405 // true if when we were added to hierarchy we were without focus manager 1399 // true if when we were added to hierarchy we were without focus manager
1406 // attempt addition when ancestor chain changed. 1400 // attempt addition when ancestor chain changed.
1407 bool accelerator_registration_delayed_; 1401 bool accelerator_registration_delayed_;
1408 1402
1409 // Focus manager accelerators registered on. 1403 // Focus manager accelerators registered on.
1410 FocusManager* accelerator_focus_manager_; 1404 FocusManager* accelerator_focus_manager_;
1411 1405
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 #if defined(OS_WIN) 1439 #if defined(OS_WIN)
1446 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_; 1440 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_;
1447 #endif 1441 #endif
1448 1442
1449 DISALLOW_COPY_AND_ASSIGN(View); 1443 DISALLOW_COPY_AND_ASSIGN(View);
1450 }; 1444 };
1451 1445
1452 } // namespace views 1446 } // namespace views
1453 1447
1454 #endif // VIEWS_VIEW_H_ 1448 #endif // VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698