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

Side by Side Diff: views/view.h

Issue 7273073: Animated Rotation (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Pulled unnecessary changes out of this CL Created 9 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) 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 // Returns whether the view is enabled. 253 // Returns whether the view is enabled.
254 virtual bool IsEnabled() const; 254 virtual bool IsEnabled() const;
255 255
256 // This indicates that the view completely fills its bounds in an opaque 256 // This indicates that the view completely fills its bounds in an opaque
257 // color. 257 // color.
258 // This doesn't affect compositing but is a hint to the compositor to optimize 258 // This doesn't affect compositing but is a hint to the compositor to optimize
259 // painting. 259 // painting.
260 void SetFillsBoundsOpaquely(bool fills_bounds_opaquely); 260 void SetFillsBoundsOpaquely(bool fills_bounds_opaquely);
261 261
262 // Used to disable painting (e.g., during an animation when expensive
263 // operations like painting can cause noticeable jank).
264 void set_painting_enabled(bool enabled) { painting_enabled_ = enabled; }
265 bool painting_enabled() const { return painting_enabled_; }
266
262 // Transformations ----------------------------------------------------------- 267 // Transformations -----------------------------------------------------------
263 268
264 // Methods for setting transformations for a view (e.g. rotation, scaling). 269 // Methods for setting transformations for a view (e.g. rotation, scaling).
265 270
266 const ui::Transform& GetTransform() const; 271 const ui::Transform& GetTransform() const;
267 272
268 // Clipping parameters. Clipping happens from the right and/or bottom. The 273 // Clipping parameters. Clipping happens from the right and/or bottom. The
269 // clipping amount is in parent's coordinate system, as in, if the view is 274 // clipping amount is in parent's coordinate system, as in, if the view is
270 // rotated, then the clipping will be applied after the rotation (and other 275 // rotated, then the clipping will be applied after the rotation (and other
271 // transformations, if any). 276 // transformations, if any).
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 1351
1347 // This View's bounds in the parent coordinate system. 1352 // This View's bounds in the parent coordinate system.
1348 gfx::Rect bounds_; 1353 gfx::Rect bounds_;
1349 1354
1350 // Whether this view is visible. 1355 // Whether this view is visible.
1351 bool visible_; 1356 bool visible_;
1352 1357
1353 // Whether this view is enabled. 1358 // Whether this view is enabled.
1354 bool enabled_; 1359 bool enabled_;
1355 1360
1361 // Whether this view is painting.
1362 bool painting_enabled_;
1363
1356 // Whether or not RegisterViewForVisibleBoundsNotification on the RootView 1364 // Whether or not RegisterViewForVisibleBoundsNotification on the RootView
1357 // has been invoked. 1365 // has been invoked.
1358 bool registered_for_visible_bounds_notification_; 1366 bool registered_for_visible_bounds_notification_;
1359 1367
1360 // List of descendants wanting notification when their visible bounds change. 1368 // List of descendants wanting notification when their visible bounds change.
1361 scoped_ptr<Views> descendants_to_notify_; 1369 scoped_ptr<Views> descendants_to_notify_;
1362 1370
1363 // Transformations ----------------------------------------------------------- 1371 // Transformations -----------------------------------------------------------
1364 1372
1365 // Clipping parameters. skia transformation matrix does not give us clipping. 1373 // Clipping parameters. skia transformation matrix does not give us clipping.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1440 #if defined(OS_WIN) 1448 #if defined(OS_WIN)
1441 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_; 1449 scoped_refptr<NativeViewAccessibilityWin> native_view_accessibility_win_;
1442 #endif 1450 #endif
1443 1451
1444 DISALLOW_COPY_AND_ASSIGN(View); 1452 DISALLOW_COPY_AND_ASSIGN(View);
1445 }; 1453 };
1446 1454
1447 } // namespace views 1455 } // namespace views
1448 1456
1449 #endif // VIEWS_VIEW_H_ 1457 #endif // VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698